| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SKY_ENGINE_INSPECTOR_INSPECTOR_BACKEND_MOJO_H_ | 5 #ifndef SKY_ENGINE_V8_INSPECTOR_INSPECTOR_BACKEND_MOJO_H_ |
| 6 #define SKY_ENGINE_INSPECTOR_INSPECTOR_BACKEND_MOJO_H_ | 6 #define SKY_ENGINE_V8_INSPECTOR_INSPECTOR_BACKEND_MOJO_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "core/inspector/InspectorFrontendChannel.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "sky/services/inspector/inspector.mojom.h" | 10 #include "sky/services/inspector/inspector.mojom.h" |
| 11 | 11 |
| 12 // The impl still uses namespace blink for convenience. |
| 12 namespace blink { | 13 namespace blink { |
| 13 class FrameHost; | 14 class InspectorBackendMojoImpl; |
| 14 class InspectorBackendDispatcher; | 15 } |
| 15 class JSONObject; | |
| 16 class PageDebuggerAgent; | |
| 17 class InjectedScriptManager; | |
| 18 class InspectorState; | |
| 19 class InstrumentingAgents; | |
| 20 class InspectorFrontend; | |
| 21 | 16 |
| 22 class InspectorBackendMojo : public mojo::InterfaceImpl<sky::InspectorBackend>, | 17 namespace inspector { |
| 23 public InspectorFrontendChannel { | 18 class InspectorHost; |
| 19 |
| 20 class InspectorBackendMojo { |
| 24 public: | 21 public: |
| 25 explicit InspectorBackendMojo(const FrameHost& frame_host); | 22 explicit InspectorBackendMojo(InspectorHost*); |
| 26 ~InspectorBackendMojo(); | 23 ~InspectorBackendMojo(); |
| 27 | 24 |
| 28 void Connect(); | 25 void Connect(); |
| 29 | 26 |
| 30 private: | 27 private: |
| 31 // InspectorBackend: | 28 scoped_ptr<blink::InspectorBackendMojoImpl> impl_; |
| 32 void OnConnect() override; | |
| 33 void OnDisconnect() override; | |
| 34 void OnMessage(const mojo::String& message) override; | |
| 35 | |
| 36 // InspectorFrontendChannel: | |
| 37 void sendMessageToFrontend(PassRefPtr<JSONObject> message) override; | |
| 38 void flush() override; | |
| 39 | |
| 40 const FrameHost& frame_host_; | |
| 41 | |
| 42 sky::InspectorFrontendPtr frontend_; | |
| 43 | |
| 44 OwnPtr<InspectorFrontend> old_frontend_; | |
| 45 RefPtr<InspectorBackendDispatcher> dispatcher_; | |
| 46 OwnPtr<PageDebuggerAgent> debugger_agent_; | |
| 47 OwnPtr<InjectedScriptManager> script_manager_; | |
| 48 OwnPtr<InspectorState> inspector_state_; | |
| 49 OwnPtr<InstrumentingAgents> agents_; | |
| 50 | 29 |
| 51 DISALLOW_COPY_AND_ASSIGN(InspectorBackendMojo); | 30 DISALLOW_COPY_AND_ASSIGN(InspectorBackendMojo); |
| 52 }; | 31 }; |
| 53 | 32 |
| 54 } // namespace blink | 33 } // namespace inspector |
| 55 | 34 |
| 56 #endif // SKY_ENGINE_INSPECTOR_INSPECTOR_BACKEND_MOJO_H_ | 35 #endif // SKY_ENGINE_V8_INSPECTOR_INSPECTOR_BACKEND_MOJO_H_ |
| OLD | NEW |