/* * 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. */ #include "NativeFantomTestSpecificMethods.h" #include #include #include "internal/FantomForcedCloneCommitHook.h" #if RN_DISABLE_OSS_PLUGIN_HEADER #include "Plugins.h" #endif std::shared_ptr NativeFantomTestSpecificMethodsModuleProvider( std::shared_ptr jsInvoker) { return std::make_shared( std::move(jsInvoker)); } namespace { facebook::react::UIManager& getUIManagerFromRuntime( facebook::jsi::Runtime& runtime) { return facebook::react::UIManagerBinding::getBinding(runtime)->getUIManager(); } } // namespace namespace facebook::react { NativeFantomTestSpecificMethods::NativeFantomTestSpecificMethods( std::shared_ptr jsInvoker) : NativeFantomTestSpecificMethodsCxxSpec(std::move(jsInvoker)), fantomForcedCloneCommitHook_( std::make_shared()) {} void NativeFantomTestSpecificMethods::registerForcedCloneCommitHook( jsi::Runtime& runtime) { auto& uiManager = getUIManagerFromRuntime(runtime); uiManager.registerCommitHook(*fantomForcedCloneCommitHook_); } void NativeFantomTestSpecificMethods::takeFunctionAndNoop( jsi::Runtime& runtime, jsi::Function function) {} } // namespace facebook::react