Fabric: Introducing ContextContainer

Summary:
@public
`ContextContainer` is general purpose DI container for Fabric.
We need this to communicate some enviroment-specific and/or platform-specific modules down to cross-platform C++ code.
The first one will be ImageManager. Soon.

Reviewed By: fkgozali

Differential Revision: D8475636

fbshipit-source-id: 0afc65063f818d0bab736cd2c55c6fdd21b629ac
This commit is contained in:
Valentin Shergin
2018-06-22 07:28:34 -07:00
committed by Facebook Github Bot
parent 0a20f47021
commit c674303dfd
7 changed files with 79 additions and 6 deletions

View File

@@ -7,6 +7,7 @@
#include <fabric/uimanager/ComponentDescriptorFactory.h>
#include <fabric/uimanager/ComponentDescriptorRegistry.h>
#include <fabric/uimanager/ContextContainer.h>
namespace facebook {
namespace react {
@@ -14,7 +15,10 @@ namespace react {
/**
* This is a sample implementation. Each app should provide its own.
*/
SharedComponentDescriptorRegistry ComponentDescriptorFactory::buildRegistry(const SharedEventDispatcher &eventDispatcher) {
SharedComponentDescriptorRegistry ComponentDescriptorFactory::buildRegistry(
const SharedEventDispatcher &eventDispatcher,
const SharedContextContainer &contextContainer
) {
auto registry = std::make_shared<ComponentDescriptorRegistry>();
return registry;
}