Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 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_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ | 5 #ifndef CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_DEVTOOLS_AGENT_H |
| 6 #define CONTENT_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ | 6 #define CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_DEVTOOLS_AGENT_H |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/macros.h" |
| 11 | |
| 12 namespace IPC { | |
| 13 class Message; | |
| 14 } | |
| 15 | 11 |
| 16 namespace blink { | 12 namespace blink { |
| 17 class WebSharedWorker; | 13 class WebSharedWorker; |
| 18 class WebString; | 14 class WebString; |
| 19 } | 15 } |
| 20 | 16 |
| 17 namespace IPC { | |
| 18 class Message; | |
| 19 } | |
| 20 | |
| 21 namespace content { | 21 namespace content { |
| 22 | 22 |
| 23 class SharedWorkerDevToolsAgent { | 23 class EmbeddedSharedWorkerDevToolsAgent { |
|
kinuko
2014/02/13 06:09:36
Will we need a separate class from SharedWorkerDev
horo
2014/02/13 08:54:20
I moved shared_worker_devtools_agent.* to content/
| |
| 24 public: | 24 public: |
| 25 SharedWorkerDevToolsAgent(int route_id, blink::WebSharedWorker*); | 25 EmbeddedSharedWorkerDevToolsAgent(int route_id, blink::WebSharedWorker*); |
| 26 ~SharedWorkerDevToolsAgent(); | 26 ~EmbeddedSharedWorkerDevToolsAgent(); |
| 27 | 27 |
| 28 // Called on the Worker thread. | |
| 29 bool OnMessageReceived(const IPC::Message& message); | 28 bool OnMessageReceived(const IPC::Message& message); |
| 30 void SendDevToolsMessage(const blink::WebString&); | 29 void SendDevToolsMessage(const blink::WebString&); |
| 31 void SaveDevToolsAgentState(const blink::WebString& state); | 30 void SaveDevToolsAgentState(const blink::WebString& state); |
| 32 | 31 |
| 33 private: | 32 private: |
| 34 void OnAttach(); | 33 void OnAttach(); |
| 35 void OnReattach(const std::string&); | 34 void OnReattach(const std::string&); |
| 36 void OnDetach(); | 35 void OnDetach(); |
| 37 void OnDispatchOnInspectorBackend(const std::string& message); | 36 void OnDispatchOnInspectorBackend(const std::string& message); |
| 38 void OnPauseWorkerContextOnStart(); | 37 void OnPauseWorkerContextOnStart(); |
| 39 void OnResumeWorkerContext(); | 38 void OnResumeWorkerContext(); |
| 40 | 39 |
| 41 bool Send(IPC::Message* message); | 40 bool Send(IPC::Message* message); |
| 42 const int route_id_; | 41 const int route_id_; |
| 43 blink::WebSharedWorker* webworker_; | 42 blink::WebSharedWorker* webworker_; |
| 44 | 43 |
| 45 DISALLOW_COPY_AND_ASSIGN(SharedWorkerDevToolsAgent); | 44 DISALLOW_COPY_AND_ASSIGN(EmbeddedSharedWorkerDevToolsAgent); |
| 46 }; | 45 }; |
| 47 | 46 |
| 48 } // namespace content | 47 } // namespace content |
| 49 | 48 |
| 50 #endif // CONTENT_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ | 49 #endif // CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_DEVTOOLS_AGENT_ H |
| OLD | NEW |