| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 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 CHROME_WORKER_WORKER_DEVTOOLS_AGENT_H_ |
| 6 #define CHROME_WORKER_WORKER_DEVTOOLS_AGENT_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "content/worker/webworker_stub.h" |
| 13 |
| 14 namespace IPC { |
| 15 class Message; |
| 16 } |
| 17 |
| 18 namespace WebKit { |
| 19 class WebWorker; |
| 20 } |
| 21 |
| 22 class WorkerDevToolsAgent : public WebWorkerStub::DevToolsDelegate |
| 23 , public WebWorkerClientProxy::DevToolsDelegate { |
| 24 public: |
| 25 explicit WorkerDevToolsAgent(int route_id, WebKit::WebWorker*); |
| 26 virtual ~WorkerDevToolsAgent(); |
| 27 |
| 28 private: |
| 29 // WebWorkerStub::DevToolsDelegate implementation. |
| 30 virtual bool OnMessageReceived(const IPC::Message& message); |
| 31 virtual void WebWorkerStubDestroyed(); |
| 32 |
| 33 void OnAttach(); |
| 34 void OnDetach(); |
| 35 void OnDispatchOnInspectorBackend(const std::string& message); |
| 36 |
| 37 bool Send(IPC::Message* message); |
| 38 |
| 39 // WebWorkerClientProxy::DevToolsDelegate implementation |
| 40 virtual void SendDevToolsMessage(const WebKit::WebString&); |
| 41 |
| 42 int route_id_; |
| 43 WebKit::WebWorker* webworker_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsAgent); |
| 46 }; |
| 47 |
| 48 #endif // CHROME_WORKER_WORKER_DEVTOOLS_AGENT_H_ |
| OLD | NEW |