mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39354 changelog: [internal] Changes `ComponentDescriptor::adopt` to not be protected and it now accepts ShadowNode reference rather than shared_ptr. Reviewed By: javache Differential Revision: D49054000 fbshipit-source-id: 7aa8201277d6ef4046af45fd43360fa7af3b7d44
37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.h>
|
|
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
|
|
namespace facebook::react {
|
|
|
|
class LegacyViewManagerInteropComponentDescriptor final
|
|
: public ConcreteComponentDescriptor<LegacyViewManagerInteropShadowNode> {
|
|
public:
|
|
using ConcreteComponentDescriptor::ConcreteComponentDescriptor;
|
|
|
|
LegacyViewManagerInteropComponentDescriptor(
|
|
const ComponentDescriptorParameters& parameters);
|
|
/*
|
|
* Returns `name` and `handle` based on a `flavor`, not on static data from
|
|
* `LegacyViewManagerInteropShadowNode`.
|
|
*/
|
|
ComponentHandle getComponentHandle() const override;
|
|
ComponentName getComponentName() const override;
|
|
|
|
protected:
|
|
void adopt(ShadowNode& shadowNode) const override;
|
|
|
|
private:
|
|
const std::shared_ptr<void> _coordinator;
|
|
};
|
|
|
|
} // namespace facebook::react
|