RCTSurfacePresenterBridgeAdapter.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #import <Foundation/Foundation.h>
  8. #import <UIKit/UIKit.h>
  9. #import <react/utils/ContextContainer.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. @class RCTSurfacePresenter;
  12. @class RCTBridge;
  13. /*
  14. * Controls a life-cycle of a Surface Presenter based on Bridge's life-cycle.
  15. * We are moving away from using Bridge.
  16. * This class is intended to be used only during the transition period.
  17. */
  18. @interface RCTSurfacePresenterBridgeAdapter : NSObject
  19. - (instancetype)initWithBridge:(RCTBridge *)bridge
  20. contextContainer:(facebook::react::ContextContainer::Shared)contextContainer;
  21. /*
  22. * Returns a stored instance of Surface Presenter which is managed by a bridge.
  23. */
  24. @property (nonatomic, readonly) RCTSurfacePresenter *surfacePresenter;
  25. /*
  26. * Controls a stored instance of the Bridge. A consumer can re-set the stored Bridge using that method; the class is
  27. * responsible to coordinate this change with a SurfacePresetner accordingly.
  28. */
  29. @property (nonatomic, weak) RCTBridge *bridge;
  30. @end
  31. NS_ASSUME_NONNULL_END