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_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ |
7 | 7 |
8 #include "content/browser/devtools/embedded_worker_devtools_agent_host.h" | 8 #include "content/browser/devtools/service_worker_devtools_manager.h" |
| 9 #include "content/browser/devtools/worker_devtools_agent_host.h" |
9 | 10 |
10 namespace content { | 11 namespace content { |
11 | 12 |
12 class ServiceWorkerDevToolsAgentHost : public EmbeddedWorkerDevToolsAgentHost { | 13 class ServiceWorkerDevToolsAgentHost : public WorkerDevToolsAgentHost { |
13 public: | 14 public: |
| 15 typedef ServiceWorkerDevToolsManager::ServiceWorkerIdentifier |
| 16 ServiceWorkerIdentifier; |
| 17 |
14 ServiceWorkerDevToolsAgentHost(WorkerId worker_id, | 18 ServiceWorkerDevToolsAgentHost(WorkerId worker_id, |
15 const ServiceWorkerIdentifier& service_worker, | 19 const ServiceWorkerIdentifier& service_worker, |
16 bool debug_service_worker_on_start); | 20 bool debug_service_worker_on_start); |
17 | 21 |
18 // DevToolsAgentHost override. | 22 // DevToolsAgentHost override. |
19 Type GetType() override; | 23 Type GetType() override; |
20 std::string GetTitle() override; | 24 std::string GetTitle() override; |
21 GURL GetURL() override; | 25 GURL GetURL() override; |
22 bool Activate() override; | 26 bool Activate() override; |
23 bool Close() override; | 27 bool Close() override; |
24 | 28 |
25 // IPCDevToolsAgentHost override. | 29 // IPCDevToolsAgentHost override. |
26 void OnClientAttached() override; | 30 void OnClientAttached() override; |
27 void OnClientDetached() override; | 31 void OnClientDetached() override; |
28 | 32 |
29 // EmbeddedWorkerDevToolsAgentHost override. | 33 bool Matches(const ServiceWorkerIdentifier& other); |
30 bool Matches(const ServiceWorkerIdentifier& other) override; | |
31 | 34 |
32 private: | 35 private: |
33 ~ServiceWorkerDevToolsAgentHost() override; | 36 ~ServiceWorkerDevToolsAgentHost() override; |
34 scoped_ptr<ServiceWorkerIdentifier> service_worker_; | 37 scoped_ptr<ServiceWorkerIdentifier> service_worker_; |
35 | 38 |
36 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDevToolsAgentHost); | 39 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDevToolsAgentHost); |
37 }; | 40 }; |
38 | 41 |
39 } // namespace content | 42 } // namespace content |
40 | 43 |
41 #endif // CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ | 44 #endif // CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |