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

Unified Diff: content/browser/debugger/worker_devtools_message_filter.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
Index: content/browser/debugger/worker_devtools_message_filter.cc
diff --git a/content/browser/debugger/worker_devtools_message_filter.cc b/content/browser/debugger/worker_devtools_message_filter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a086c9bfca3d450fc8b50c4f9e83f6baeb8b6d07
--- /dev/null
+++ b/content/browser/debugger/worker_devtools_message_filter.cc
@@ -0,0 +1,42 @@
+// 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.
+
+#include "content/browser/debugger/worker_devtools_message_filter.h"
+
+#include "content/browser/debugger/worker_devtools_manager_io.h"
+#include "content/browser/worker_host/worker_service.h"
+#include "content/common/devtools_messages.h"
+#include "content/common/worker_messages.h"
+
+WorkerDevToolsMessageFilter::WorkerDevToolsMessageFilter(
+ int worker_process_host_id)
+ : worker_process_host_id_(worker_process_host_id) {
+}
+
+WorkerDevToolsMessageFilter::~WorkerDevToolsMessageFilter() {
+}
+
+void WorkerDevToolsMessageFilter::OnChannelClosing() {
+ BrowserMessageFilter::OnChannelClosing();
+ WorkerDevToolsManagerIO::GetInstance()->WorkerProcessDestroying(
+ worker_process_host_id_);
+}
+
+bool WorkerDevToolsMessageFilter::OnMessageReceived(
+ const IPC::Message& message,
+ bool* message_was_ok) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP_EX(WorkerDevToolsMessageFilter, message,
+ *message_was_ok)
+ IPC_MESSAGE_HANDLER(DevToolsHostMsg_ForwardToClient, OnForwardToClient)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP_EX()
+ return handled;
+}
+
+void WorkerDevToolsMessageFilter::OnForwardToClient(
+ const IPC::Message& message) {
+ WorkerDevToolsManagerIO::GetInstance()->ForwardToDevToolsClient(
+ worker_process_host_id_, message.routing_id(), message);
+}
« no previous file with comments | « content/browser/debugger/worker_devtools_message_filter.h ('k') | content/browser/worker_host/worker_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698