OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ | 5 #ifndef CONTENT_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ |
6 #define CONTENT_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ | 6 #define CONTENT_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 | 11 |
12 namespace IPC { | 12 namespace IPC { |
13 class Message; | 13 class Message; |
14 } | 14 } |
15 | 15 |
16 namespace WebKit { | 16 namespace WebKit { |
17 class WebSharedWorker; | 17 class WebSharedWorker; |
18 class WebString; | 18 class WebString; |
19 } | 19 } |
20 | 20 |
| 21 namespace content { |
| 22 |
21 class SharedWorkerDevToolsAgent { | 23 class SharedWorkerDevToolsAgent { |
22 public: | 24 public: |
23 SharedWorkerDevToolsAgent(int route_id, WebKit::WebSharedWorker*); | 25 SharedWorkerDevToolsAgent(int route_id, WebKit::WebSharedWorker*); |
24 ~SharedWorkerDevToolsAgent(); | 26 ~SharedWorkerDevToolsAgent(); |
25 | 27 |
26 // Called on the Worker thread. | 28 // Called on the Worker thread. |
27 bool OnMessageReceived(const IPC::Message& message); | 29 bool OnMessageReceived(const IPC::Message& message); |
28 void SendDevToolsMessage(const WebKit::WebString&); | 30 void SendDevToolsMessage(const WebKit::WebString&); |
29 void SaveDevToolsAgentState(const WebKit::WebString& state); | 31 void SaveDevToolsAgentState(const WebKit::WebString& state); |
30 | 32 |
31 private: | 33 private: |
32 void OnAttach(); | 34 void OnAttach(); |
33 void OnReattach(const std::string&); | 35 void OnReattach(const std::string&); |
34 void OnDetach(); | 36 void OnDetach(); |
35 void OnDispatchOnInspectorBackend(const std::string& message); | 37 void OnDispatchOnInspectorBackend(const std::string& message); |
36 void OnPauseWorkerContextOnStart(); | 38 void OnPauseWorkerContextOnStart(); |
37 void OnResumeWorkerContext(); | 39 void OnResumeWorkerContext(); |
38 | 40 |
39 bool Send(IPC::Message* message); | 41 bool Send(IPC::Message* message); |
40 const int route_id_; | 42 const int route_id_; |
41 WebKit::WebSharedWorker* webworker_; | 43 WebKit::WebSharedWorker* webworker_; |
42 | 44 |
43 DISALLOW_COPY_AND_ASSIGN(SharedWorkerDevToolsAgent); | 45 DISALLOW_COPY_AND_ASSIGN(SharedWorkerDevToolsAgent); |
44 }; | 46 }; |
45 | 47 |
| 48 } // namespace content |
| 49 |
46 #endif // CONTENT_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ | 50 #endif // CONTENT_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ |
OLD | NEW |