Skip to content

Commit 4897be0

Browse files
committed
test
1 parent b0ceb09 commit 4897be0

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#import <React/RCTSurfaceProtocol.h>
1212
#import <React/RCTSurfaceSizeMeasureMode.h>
1313
#import <React/RCTSurfaceStage.h>
14+
#import <react/utils/ContextContainer.h>
1415

1516
@class RCTBridge;
1617
@class RCTSurface;
@@ -48,6 +49,12 @@ NS_ASSUME_NONNULL_BEGIN
4849
*/
4950
@property (nonatomic, assign) RCTSurfaceSizeMeasureMode sizeMeasureMode;
5051

52+
/** [macOS
53+
* Context container that provides access to the React Native runtime and TurboModule registry.
54+
* Primarily used to get access to the dev menu.
55+
*/
56+
@property (nonatomic, assign, nullable) facebook::react::ContextContainer::Shared contextContainer; // macOS]
57+
5158
/**
5259
* Activity indicator factory.
5360
* A hosting view may use this block to instantiate and display custom activity

packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#import "RCTSurfaceView.h"
1414
#import "RCTUtils.h"
1515

16+
#import <react/utils/ContextContainer.h> // [macOS]
17+
1618
@interface RCTSurfaceHostingView ()
1719

1820
@property (nonatomic, assign) BOOL isActivityIndicatorViewVisible;
@@ -25,6 +27,7 @@ @implementation RCTSurfaceHostingView {
2527
RCTPlatformView *_Nullable _surfaceView; // [macOS]
2628
RCTSurfaceStage _stage;
2729
BOOL _autoHideDisabled;
30+
facebook::react::ContextContainer::Shared _contextContainer; // [macOS]
2831
}
2932

3033
RCT_NOT_IMPLEMENTED(-(instancetype)init)
@@ -134,6 +137,19 @@ - (void)setSizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode
134137
_sizeMeasureMode = sizeMeasureMode;
135138
[self _invalidateLayout];
136139
}
140+
141+
// [macOS
142+
- (facebook::react::ContextContainer::Shared)contextContainer
143+
{
144+
return _contextContainer;
145+
}
146+
147+
- (void)setContextContainer:(facebook::react::ContextContainer::Shared)contextContainer
148+
{
149+
_contextContainer = contextContainer;
150+
}
151+
// macOS]
152+
137153
- (void)disableActivityIndicatorAutoHide:(BOOL)disabled
138154
{
139155
_autoHideDisabled = disabled;

0 commit comments

Comments
 (0)