| 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 "content/browser/devtools/ipc_devtools_agent_host.h" | 8 #include "content/browser/devtools/ipc_devtools_agent_host.h" |
| 9 #include "content/browser/devtools/worker_devtools_manager.h" | |
| 10 #include "ipc/ipc_listener.h" | 9 #include "ipc/ipc_listener.h" |
| 11 | 10 |
| 12 namespace content { | 11 namespace content { |
| 13 | 12 |
| 14 class BrowserContext; | 13 class BrowserContext; |
| 15 class SharedWorkerInstance; | 14 class SharedWorkerInstance; |
| 16 | 15 |
| 17 class WorkerDevToolsAgentHost : public IPCDevToolsAgentHost, | 16 class WorkerDevToolsAgentHost : public IPCDevToolsAgentHost, |
| 18 public IPC::Listener { | 17 public IPC::Listener { |
| 19 public: | 18 public: |
| 20 typedef WorkerDevToolsManager::WorkerId WorkerId; | 19 typedef std::pair<int, int> WorkerId; |
| 21 | 20 |
| 22 // DevToolsAgentHost override. | 21 // DevToolsAgentHost override. |
| 23 bool IsWorker() const override; | 22 bool IsWorker() const override; |
| 24 BrowserContext* GetBrowserContext() override; | 23 BrowserContext* GetBrowserContext() override; |
| 25 | 24 |
| 26 // IPCDevToolsAgentHost implementation. | 25 // IPCDevToolsAgentHost implementation. |
| 27 void SendMessageToAgent(IPC::Message* message) override; | 26 void SendMessageToAgent(IPC::Message* message) override; |
| 28 void Attach() override; | 27 void Attach() override; |
| 29 void OnClientAttached() override; | 28 void OnClientAttached() override; |
| 30 void OnClientDetached() override; | 29 void OnClientDetached() override; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 61 friend class SharedWorkerDevToolsManagerTest; | 60 friend class SharedWorkerDevToolsManagerTest; |
| 62 | 61 |
| 63 WorkerState state_; | 62 WorkerState state_; |
| 64 WorkerId worker_id_; | 63 WorkerId worker_id_; |
| 65 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsAgentHost); | 64 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsAgentHost); |
| 66 }; | 65 }; |
| 67 | 66 |
| 68 } // namespace content | 67 } // namespace content |
| 69 | 68 |
| 70 #endif // CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_ | 69 #endif // CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |