mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This diff implements iOS-specific `PlatformRunLoopObserver` (and `MainRunLoopObserver`) that then being glued together with `SynchronousEventBeat` replaces `MainRunLoopEventBeat`, and then same thing glued with `AsynchronousEventBeat` replaces `RuntimeEventBeat`. So, instead of two platform-specific classes we had on iOS (for that needs), now we have only one (that can be reused for a more broad variety of applications). Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D21341998 fbshipit-source-id: fafde4e678770f7fcf9c1ff87acc02812a37e708
56 lines
1.4 KiB
C++
56 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its 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 <ReactCommon/RuntimeExecutor.h>
|
|
#include <react/componentregistry/ComponentDescriptorFactory.h>
|
|
#include <react/core/EventBeat.h>
|
|
#include <react/utils/ContextContainer.h>
|
|
#include <react/utils/RunLoopObserver.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
/*
|
|
* Contains all external dependencies of Scheduler.
|
|
* Copyable.
|
|
*/
|
|
struct SchedulerToolbox final {
|
|
/*
|
|
* Represents general purpose DI container for product components/needs.
|
|
* Must not be `nullptr`.
|
|
*/
|
|
ContextContainer::Shared contextContainer;
|
|
|
|
/*
|
|
* Represents externally managed, lazily available collection of components.
|
|
*/
|
|
ComponentRegistryFactory componentRegistryFactory;
|
|
|
|
/*
|
|
* Represents running JavaScript VM and associated execution queue.
|
|
*/
|
|
RuntimeExecutor runtimeExecutor;
|
|
|
|
/*
|
|
* Represent connections with a platform-specific UI run loops.
|
|
*/
|
|
RunLoopObserver::Factory mainRunLoopObserverFactory;
|
|
|
|
/*
|
|
* Asynchronous & synchronous event beats.
|
|
* Represent connections with the platform-specific run loops and general
|
|
* purpose background queue.
|
|
*/
|
|
EventBeat::Factory asynchronousEventBeatFactory;
|
|
EventBeat::Factory synchronousEventBeatFactory;
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|