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

Unified Diff: content/worker/webworker_stub.cc

Issue 6990059: DevTools: devtools message plumbing between worker and page processes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed extra line 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
« no previous file with comments | « content/worker/webworker_stub.h ('k') | content/worker/webworkerclient_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/worker/webworker_stub.cc
diff --git a/content/worker/webworker_stub.cc b/content/worker/webworker_stub.cc
index 1cf7fdb4431c52783a083030288d89a8cf4698a0..b7ecd134601dbbb240bed0b55edf875cb39acd7b 100644
--- a/content/worker/webworker_stub.cc
+++ b/content/worker/webworker_stub.cc
@@ -6,9 +6,11 @@
#include "base/command_line.h"
#include "content/common/child_thread.h"
+#include "content/common/content_client.h"
#include "content/common/file_system/file_system_dispatcher.h"
#include "content/common/webmessageportchannel_impl.h"
#include "content/common/worker_messages.h"
+#include "content/worker/worker_devtools_agent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWorker.h"
@@ -19,7 +21,10 @@ WebWorkerStub::WebWorkerStub(const GURL& url, int route_id,
const WorkerAppCacheInitInfo& appcache_init_info)
: WebWorkerStubBase(route_id, appcache_init_info),
ALLOW_THIS_IN_INITIALIZER_LIST(impl_(WebWorker::create(client()))),
- url_(url) {
+ url_(url),
+ ALLOW_THIS_IN_INITIALIZER_LIST(worker_devtools_agent_(
+ new WorkerDevToolsAgent(route_id, impl_))) {
+ client()->set_devtools_agent(worker_devtools_agent_.get());
}
WebWorkerStub::~WebWorkerStub() {
@@ -38,6 +43,9 @@ bool WebWorkerStub::OnMessageReceived(const IPC::Message& message) {
if (!impl_)
return false;
+ if (worker_devtools_agent_->OnMessageReceived(message))
+ return true;
+
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(WebWorkerStub, message)
IPC_MESSAGE_FORWARD(WorkerMsg_StartWorkerContext, impl_,
« no previous file with comments | « content/worker/webworker_stub.h ('k') | content/worker/webworkerclient_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698