RCTCxxBridgeDelegate.h 821 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #include <memory>
  8. #import <React/RCTBridgeDelegate.h>
  9. namespace facebook {
  10. namespace react {
  11. class JSExecutorFactory;
  12. }
  13. }
  14. // This is a separate class so non-C++ implementations don't need to
  15. // take a C++ dependency.
  16. @protocol RCTCxxBridgeDelegate <RCTBridgeDelegate>
  17. /**
  18. * In the RCTCxxBridge, if this method is implemented, return a
  19. * ExecutorFactory instance which can be used to create the executor.
  20. * If not implemented, or returns an empty pointer, JSIExecutorFactory
  21. * will be used with a JSCRuntime.
  22. */
  23. - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge;
  24. @end