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_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ |
7 | 7 |
8 #include "content/browser/devtools/embedded_worker_devtools_manager.h" | 8 #include "content/browser/devtools/embedded_worker_devtools_manager.h" |
9 #include "content/browser/devtools/ipc_devtools_agent_host.h" | 9 #include "content/browser/devtools/ipc_devtools_agent_host.h" |
10 #include "ipc/ipc_listener.h" | 10 #include "ipc/ipc_listener.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 EmbeddedWorkerDevToolsAgentHost(WorkerId worker_id, | 23 EmbeddedWorkerDevToolsAgentHost(WorkerId worker_id, |
24 const SharedWorkerInstance& shared_worker); | 24 const SharedWorkerInstance& shared_worker); |
25 | 25 |
26 EmbeddedWorkerDevToolsAgentHost(WorkerId worker_id, | 26 EmbeddedWorkerDevToolsAgentHost(WorkerId worker_id, |
27 const ServiceWorkerIdentifier& service_worker, | 27 const ServiceWorkerIdentifier& service_worker, |
28 bool debug_service_worker_on_start); | 28 bool debug_service_worker_on_start); |
29 | 29 |
30 // DevToolsAgentHost override. | 30 // DevToolsAgentHost override. |
31 virtual bool IsWorker() const OVERRIDE; | 31 virtual bool IsWorker() const OVERRIDE; |
| 32 virtual Type GetType() OVERRIDE; |
| 33 virtual std::string GetTitle() OVERRIDE; |
| 34 virtual GURL GetURL() OVERRIDE; |
| 35 virtual bool Activate() OVERRIDE; |
| 36 virtual bool Close() OVERRIDE; |
32 | 37 |
33 // IPCDevToolsAgentHost implementation. | 38 // IPCDevToolsAgentHost implementation. |
34 virtual void SendMessageToAgent(IPC::Message* message) OVERRIDE; | 39 virtual void SendMessageToAgent(IPC::Message* message) OVERRIDE; |
35 virtual void Attach() OVERRIDE; | 40 virtual void Attach() OVERRIDE; |
36 virtual void OnClientAttached() OVERRIDE {} | 41 virtual void OnClientAttached() OVERRIDE {} |
37 virtual void OnClientDetached() OVERRIDE; | 42 virtual void OnClientDetached() OVERRIDE; |
38 | 43 |
39 // IPC::Listener implementation. | 44 // IPC::Listener implementation. |
40 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 45 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
41 | 46 |
42 void WorkerContextStarted(); | 47 void WorkerContextStarted(); |
43 void WorkerRestarted(WorkerId worker_id); | 48 void WorkerRestarted(WorkerId worker_id); |
44 void WorkerDestroyed(); | 49 void WorkerDestroyed(); |
45 bool Matches(const SharedWorkerInstance& other); | 50 bool Matches(const SharedWorkerInstance& other); |
46 bool Matches(const ServiceWorkerIdentifier& other); | 51 bool Matches(const ServiceWorkerIdentifier& other); |
47 | 52 bool IsTerminated(); |
48 virtual GURL GetURL(); | |
49 virtual bool Close(); | |
50 | 53 |
51 private: | 54 private: |
52 friend class EmbeddedWorkerDevToolsManagerTest; | 55 friend class EmbeddedWorkerDevToolsManagerTest; |
53 | 56 |
54 virtual ~EmbeddedWorkerDevToolsAgentHost(); | 57 virtual ~EmbeddedWorkerDevToolsAgentHost(); |
55 | 58 |
56 enum WorkerState { | 59 enum WorkerState { |
57 WORKER_UNINSPECTED, | 60 WORKER_UNINSPECTED, |
58 WORKER_INSPECTED, | 61 WORKER_INSPECTED, |
59 WORKER_TERMINATED, | 62 WORKER_TERMINATED, |
(...skipping 11 matching lines...) Expand all Loading... |
71 scoped_ptr<ServiceWorkerIdentifier> service_worker_; | 74 scoped_ptr<ServiceWorkerIdentifier> service_worker_; |
72 WorkerState state_; | 75 WorkerState state_; |
73 WorkerId worker_id_; | 76 WorkerId worker_id_; |
74 std::string saved_agent_state_; | 77 std::string saved_agent_state_; |
75 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerDevToolsAgentHost); | 78 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerDevToolsAgentHost); |
76 }; | 79 }; |
77 | 80 |
78 } // namespace content | 81 } // namespace content |
79 | 82 |
80 #endif // CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ | 83 #endif // CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |