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