Index: content/worker/worker_devtools_agent.h |
diff --git a/content/worker/worker_devtools_agent.h b/content/worker/worker_devtools_agent.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2b5f8842f15213b2f53dfd499aa73e296740f314 |
--- /dev/null |
+++ b/content/worker/worker_devtools_agent.h |
@@ -0,0 +1,45 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_WORKER_WORKER_DEVTOOLS_AGENT_H_ |
+#define CONTENT_WORKER_WORKER_DEVTOOLS_AGENT_H_ |
+#pragma once |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "content/worker/webworkerclient_proxy.h" |
+ |
+namespace IPC { |
+class Message; |
+} |
+ |
+namespace WebKit { |
+class WebWorker; |
+} |
+ |
+class WorkerDevToolsAgent : public WebWorkerClientProxy::DevToolsDelegate { |
+ public: |
+ explicit WorkerDevToolsAgent(int route_id, WebKit::WebWorker*); |
+ virtual ~WorkerDevToolsAgent(); |
+ |
+ bool OnMessageReceived(const IPC::Message& message); |
+ |
+ private: |
+ void OnAttach(); |
+ void OnDetach(); |
+ void OnDispatchOnInspectorBackend(const std::string& message); |
+ |
+ bool Send(IPC::Message* message); |
+ |
+ // WebWorkerClientProxy::DevToolsDelegate implementation |
+ virtual void SendDevToolsMessage(const WebKit::WebString&); |
+ |
+ int route_id_; |
+ WebKit::WebWorker* webworker_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsAgent); |
+}; |
+ |
+#endif // CONTENT_WORKER_WORKER_DEVTOOLS_AGENT_H_ |