/** * Copyright (c) Facebook, Inc. and its 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 #include "AndroidTextInputShadowNode.h" namespace facebook { namespace react { /* * Descriptor for component. */ class AndroidTextInputComponentDescriptor final : public ConcreteComponentDescriptor { public: AndroidTextInputComponentDescriptor( EventDispatcher::Weak eventDispatcher, const ContextContainer::Shared &contextContainer) : ConcreteComponentDescriptor( eventDispatcher, contextContainer) {} protected: void adopt(UnsharedShadowNode shadowNode) const override { assert(std::dynamic_pointer_cast(shadowNode)); auto concreteShadowNode = std::static_pointer_cast(shadowNode); concreteShadowNode->setContextContainer( const_cast(getContextContainer().get())); concreteShadowNode->dirtyLayout(); concreteShadowNode->enableMeasurement(); ConcreteComponentDescriptor::adopt(shadowNode); } }; } // namespace react } // namespace facebook