| 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 CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/browser/devtools/devtools_agent_host_impl.h" | 9 #include "content/browser/devtools/devtools_agent_host_impl.h" |
| 10 #include "ipc/ipc_listener.h" | 10 #include "ipc/ipc_listener.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 namespace devtools { namespace schema { class SchemaHandler; }} | 14 namespace devtools { namespace schema { class SchemaHandler; }} |
| 15 | 15 |
| 16 namespace protocol { |
| 17 class InspectorHandler; |
| 18 } |
| 19 |
| 16 class BrowserContext; | 20 class BrowserContext; |
| 17 class DevToolsProtocolHandler; | 21 class DevToolsProtocolHandler; |
| 18 | 22 |
| 19 class WorkerDevToolsAgentHost : public DevToolsAgentHostImpl, | 23 class WorkerDevToolsAgentHost : public DevToolsAgentHostImpl, |
| 20 public IPC::Listener { | 24 public IPC::Listener { |
| 21 public: | 25 public: |
| 22 typedef std::pair<int, int> WorkerId; | 26 typedef std::pair<int, int> WorkerId; |
| 23 | 27 |
| 24 // DevToolsAgentHost override. | 28 // DevToolsAgentHost override. |
| 25 BrowserContext* GetBrowserContext() override; | 29 BrowserContext* GetBrowserContext() override; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 63 } |
| 60 | 64 |
| 61 private: | 65 private: |
| 62 friend class SharedWorkerDevToolsManagerTest; | 66 friend class SharedWorkerDevToolsManagerTest; |
| 63 | 67 |
| 64 void AttachToWorker(); | 68 void AttachToWorker(); |
| 65 void DetachFromWorker(); | 69 void DetachFromWorker(); |
| 66 void WorkerCreated(); | 70 void WorkerCreated(); |
| 67 void OnDispatchOnInspectorFrontend(const DevToolsMessageChunk& message); | 71 void OnDispatchOnInspectorFrontend(const DevToolsMessageChunk& message); |
| 68 | 72 |
| 73 std::unique_ptr<protocol::InspectorHandler> inspector_handler_; |
| 69 std::unique_ptr<devtools::schema::SchemaHandler> schema_handler_; | 74 std::unique_ptr<devtools::schema::SchemaHandler> schema_handler_; |
| 70 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_; | 75 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_; |
| 71 DevToolsMessageChunkProcessor chunk_processor_; | 76 DevToolsMessageChunkProcessor chunk_processor_; |
| 72 WorkerState state_; | 77 WorkerState state_; |
| 73 WorkerId worker_id_; | 78 WorkerId worker_id_; |
| 74 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsAgentHost); | 79 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsAgentHost); |
| 75 }; | 80 }; |
| 76 | 81 |
| 77 } // namespace content | 82 } // namespace content |
| 78 | 83 |
| 79 #endif // CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_ | 84 #endif // CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |