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

Unified Diff: content/renderer/webworker_base.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/renderer/webworker_base.h ('k') | content/renderer/webworker_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webworker_base.cc
diff --git a/content/renderer/webworker_base.cc b/content/renderer/webworker_base.cc
index c8e1304eef28ecf1da2a652bb3d1c902d8a960be..c35ad64be10980dbdc122c391bae30ed85460f25 100644
--- a/content/renderer/webworker_base.cc
+++ b/content/renderer/webworker_base.cc
@@ -8,6 +8,7 @@
#include "content/common/view_messages.h"
#include "content/common/webmessageportchannel_impl.h"
#include "content/common/worker_messages.h"
+#include "content/renderer/worker_devtools_agent_proxy.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerClient.h"
@@ -22,10 +23,12 @@ WebWorkerBase::WebWorkerBase(
unsigned long long document_id,
int route_id,
int render_view_route_id,
- int parent_appcache_host_id)
+ int parent_appcache_host_id,
+ WorkerDevToolsAgentProxy* devtools_proxy)
: route_id_(route_id),
render_view_route_id_(render_view_route_id),
child_thread_(child_thread),
+ devtools_proxy_(devtools_proxy),
document_id_(document_id),
parent_appcache_host_id_(parent_appcache_host_id) {
if (route_id_ != MSG_ROUTING_NONE)
@@ -50,6 +53,9 @@ void WebWorkerBase::Disconnect() {
child_thread_->RemoveRoute(route_id_);
route_id_ = MSG_ROUTING_NONE;
+
+ if (devtools_proxy_.get())
+ devtools_proxy_->SetRouteId(MSG_ROUTING_NONE);
}
void WebWorkerBase::CreateWorkerContext(const GURL& script_url,
@@ -77,6 +83,9 @@ void WebWorkerBase::CreateWorkerContext(const GURL& script_url,
child_thread_->AddRoute(route_id_, this);
+ if (devtools_proxy_.get())
+ devtools_proxy_->SetRouteId(route_id_);
+
// We make sure that the start message is the first, since postMessage or
// connect might have already been called.
queued_messages_.insert(queued_messages_.begin(),
« no previous file with comments | « content/renderer/webworker_base.h ('k') | content/renderer/webworker_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698