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