Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2166)

Unified Diff: content/renderer/webworker_base.h

Issue 6990059: DevTools: devtools message plumbing between worker and page processes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved worker devtools login under content/ Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/webworker_base.h
diff --git a/content/renderer/webworker_base.h b/content/renderer/webworker_base.h
index 7ea07b3672f9b956293d51911fc20c4eb70f48ea..66ee5b14eca1ec7440453cab854c6970b325d1de 100644
--- a/content/renderer/webworker_base.h
+++ b/content/renderer/webworker_base.h
@@ -6,9 +6,11 @@
#define CONTENT_RENDERER_WEBWORKER_BASE_H_
#pragma once
+#include <string>
#include <vector>
#include "base/basictypes.h"
+#include "base/scoped_ptr.h"
#include "ipc/ipc_channel.h"
class ChildThread;
@@ -58,12 +60,24 @@ class WebWorkerBase : public IPC::Channel::Listener {
// Sends any messages currently in the queue.
void SendQueuedMessages();
+ class DevToolsDelegate {
+ public:
+ virtual ~DevToolsDelegate() {}
+ virtual void SetRouteId(int route_id) = 0;
+ virtual bool OnMessageReceived(const IPC::Message& message) = 0;
+
+ virtual void AttachDevTools() = 0;
+ virtual void DetachDevTools() = 0;
+ virtual void SendDevToolsMessage(const std::string&) = 0;
+ };
+
protected:
WebWorkerBase(ChildThread* child_thread,
unsigned long long document_id,
int route_id,
int render_view_route_id,
- int parent_appcache_host_id);
+ int parent_appcache_host_id,
+ DevToolsDelegate*);
// Routing id associated with this worker - used to receive messages from the
// worker, and also to route messages to the worker (WorkerService contains
@@ -76,6 +90,8 @@ class WebWorkerBase : public IPC::Channel::Listener {
ChildThread* child_thread_;
+ scoped_ptr<DevToolsDelegate> devtools_delegate_;
+
private:
void CreateWorkerContext(const GURL& script_url,
bool is_shared,

Powered by Google App Engine
This is Rietveld 408576698