forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename SurfaceRegistryBinding to AppRegistryBinding (facebook#48337)
Summary: Pull Request resolved: facebook#48337 `SurfaceRegistryBinding` refers to a forked `SurfaceRegistry` we had for a while in bridgeless but which was merged back into `AppRegistry`. Align the native name as well to make it explicit that all this class does is call into `AppRegistry`. Changelog: [Internal] Reviewed By: rshest Differential Revision: D67342499
- Loading branch information
1 parent
2b6213a
commit f603349
Showing
4 changed files
with
65 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
packages/react-native/ReactCommon/react/renderer/uimanager/AppRegistryBinding.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <folly/dynamic.h> | ||
#include <jsi/jsi.h> | ||
#include <react/renderer/core/ReactPrimitives.h> | ||
|
||
namespace facebook::react { | ||
|
||
class AppRegistryBinding final { | ||
public: | ||
AppRegistryBinding() = delete; | ||
|
||
/* | ||
* Starts React Native Surface with given id, moduleName, and props. | ||
* Thread synchronization must be enforced externally. | ||
*/ | ||
static void startSurface( | ||
jsi::Runtime& runtime, | ||
SurfaceId surfaceId, | ||
const std::string& moduleName, | ||
const folly::dynamic& initialProps, | ||
DisplayMode displayMode); | ||
|
||
/* | ||
* Updates the React Native Surface identified with surfaceId and moduleName | ||
* with the given props. | ||
* Thread synchronization must be enforced externally. | ||
*/ | ||
static void setSurfaceProps( | ||
jsi::Runtime& runtime, | ||
SurfaceId surfaceId, | ||
const std::string& moduleName, | ||
const folly::dynamic& initialProps, | ||
DisplayMode displayMode); | ||
|
||
/* | ||
* Stops React Native Surface with given id. | ||
* Thread synchronization must be enforced externally. | ||
*/ | ||
static void stopSurface(jsi::Runtime& runtime, SurfaceId surfaceId); | ||
}; | ||
|
||
} // namespace facebook::react |
50 changes: 3 additions & 47 deletions
50
packages/react-native/ReactCommon/react/renderer/uimanager/SurfaceRegistryBinding.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,6 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <folly/dynamic.h> | ||
#include <jsi/jsi.h> | ||
#include <react/renderer/core/ReactPrimitives.h> | ||
|
||
namespace facebook::react { | ||
|
||
class SurfaceRegistryBinding final { | ||
public: | ||
SurfaceRegistryBinding() = delete; | ||
|
||
/* | ||
* Starts React Native Surface with given id, moduleName, and props. | ||
* Thread synchronization must be enforced externally. | ||
*/ | ||
static void startSurface( | ||
jsi::Runtime& runtime, | ||
SurfaceId surfaceId, | ||
const std::string& moduleName, | ||
const folly::dynamic& initialProps, | ||
DisplayMode displayMode); | ||
|
||
/* | ||
* Updates the React Native Surface identified with surfaceId and moduleName | ||
* with the given props. | ||
* Thread synchronization must be enforced externally. | ||
*/ | ||
static void setSurfaceProps( | ||
jsi::Runtime& runtime, | ||
SurfaceId surfaceId, | ||
const std::string& moduleName, | ||
const folly::dynamic& initialProps, | ||
DisplayMode displayMode); | ||
|
||
/* | ||
* Stops React Native Surface with given id. | ||
* Thread synchronization must be enforced externally. | ||
*/ | ||
static void stopSurface(jsi::Runtime& runtime, SurfaceId surfaceId); | ||
}; | ||
#warning \ | ||
"The SurfaceRegistryBinding.h header has been renamed to AppRegistryBinding.h" | ||
|
||
} // namespace facebook::react | ||
#include <react/renderer/uimanager/AppRegistryBinding.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters