RCTObjcExecutor.h 845 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 <functional>
  8. #include <memory>
  9. #import <React/RCTDefines.h>
  10. #import <React/RCTJavaScriptExecutor.h>
  11. #import <cxxreact/JSExecutor.h>
  12. namespace facebook {
  13. namespace react {
  14. class RCTObjcExecutorFactory : public JSExecutorFactory {
  15. public:
  16. RCTObjcExecutorFactory(
  17. id<RCTJavaScriptExecutor> jse,
  18. RCTJavaScriptCompleteBlock errorBlock);
  19. std::unique_ptr<JSExecutor> createJSExecutor(
  20. std::shared_ptr<ExecutorDelegate> delegate,
  21. std::shared_ptr<MessageQueueThread> jsQueue) override;
  22. private:
  23. id<RCTJavaScriptExecutor> m_jse;
  24. RCTJavaScriptCompleteBlock m_errorBlock;
  25. };
  26. } // namespace react
  27. } // namespace facebook