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

Unified Diff: content/worker/websharedworker_stub.cc

Issue 7248076: DevTools: add initial support for shared workers debugging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 5 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/websharedworker_stub.h ('k') | content/worker/webworker_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/worker/websharedworker_stub.cc
diff --git a/content/worker/websharedworker_stub.cc b/content/worker/websharedworker_stub.cc
index 3ecf598fd6b8fc570b69a4ca678e4e08f31817dc..da16b158e56562b9170665c7c539cc2dfb4a43a2 100644
--- a/content/worker/websharedworker_stub.cc
+++ b/content/worker/websharedworker_stub.cc
@@ -8,6 +8,7 @@
#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/WebSharedWorker.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
@@ -17,9 +18,13 @@ WebSharedWorkerStub::WebSharedWorkerStub(
const WorkerAppCacheInitInfo& appcache_init_info)
: WebWorkerStubBase(route_id, appcache_init_info),
name_(name),
- started_(false) {
+ started_(false),
+ worker_devtools_agent_(NULL) {
// TODO(atwilson): Add support for NaCl when they support MessagePorts.
impl_ = WebKit::WebSharedWorker::create(client());
+ worker_devtools_agent_.reset(WorkerDevToolsAgent::CreateForSharedWorker(
+ route_id, impl_));
+ client()->set_devtools_agent(worker_devtools_agent_.get());
}
WebSharedWorkerStub::~WebSharedWorkerStub() {
@@ -27,6 +32,9 @@ WebSharedWorkerStub::~WebSharedWorkerStub() {
}
bool WebSharedWorkerStub::OnMessageReceived(const IPC::Message& message) {
+ if (worker_devtools_agent_->OnMessageReceived(message))
+ return true;
+
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(WebSharedWorkerStub, message)
IPC_MESSAGE_HANDLER(WorkerMsg_StartWorkerContext, OnStartWorkerContext)
« no previous file with comments | « content/worker/websharedworker_stub.h ('k') | content/worker/webworker_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698