// Copyright 2004-present Facebook. All Rights Reserved. #pragma once #include "Dispatcher.h" #include #include #include namespace JSC { class JSGlobalObject; } namespace facebook { namespace react { class ConcreteChannel; class InspectorAgent; using Receiver = std::function; class InspectorController { public: InspectorController(JSC::JSGlobalObject& globalObject); ~InspectorController(); JSC::JSGlobalObject& getGlobalObject() const { return globalObject_; } void onConnect(Receiver receiver); void onMessage(std::string message); void onGoingAway(); void onDisconnect(); private: JSC::JSGlobalObject& globalObject_; std::shared_ptr channel_; std::vector> dispatchers_; InspectorAgent* inspectorAgent_; }; } }