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

Unified Diff: content/browser/shared_worker/shared_worker_message_filter.cc

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Add missing ScopedAsyncTaskScheduler instance for the new unit tests; required by a recent change t… Created 3 years, 10 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/shared_worker/shared_worker_message_filter.cc
diff --git a/content/browser/shared_worker/shared_worker_message_filter.cc b/content/browser/shared_worker/shared_worker_message_filter.cc
index 9b5440f02040f9a24e0010d2f2d30b7ac1da7057..a2ddef37a15807b9c1cefe7780c46599425dffe9 100644
--- a/content/browser/shared_worker/shared_worker_message_filter.cc
+++ b/content/browser/shared_worker/shared_worker_message_filter.cc
@@ -7,7 +7,6 @@
#include <stdint.h>
#include "base/macros.h"
-#include "content/browser/message_port_message_filter.h"
#include "content/browser/shared_worker/shared_worker_service_impl.h"
#include "content/common/devtools_messages.h"
#include "content/common/view_messages.h"
@@ -27,14 +26,13 @@ SharedWorkerMessageFilter::SharedWorkerMessageFilter(
int render_process_id,
ResourceContext* resource_context,
const WorkerStoragePartition& partition,
- MessagePortMessageFilter* message_port_message_filter)
+ const NextRoutingIDCallback& next_routing_id_callback)
: BrowserMessageFilter(kFilteredMessageClasses,
arraysize(kFilteredMessageClasses)),
render_process_id_(render_process_id),
resource_context_(resource_context),
partition_(partition),
- message_port_message_filter_(message_port_message_filter) {
-}
+ next_routing_id_callback_(next_routing_id_callback) {}
SharedWorkerMessageFilter::~SharedWorkerMessageFilter() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -89,7 +87,7 @@ bool SharedWorkerMessageFilter::OnMessageReceived(const IPC::Message& message) {
}
int SharedWorkerMessageFilter::GetNextRoutingID() {
- return message_port_message_filter_->GetNextRoutingID();
+ return next_routing_id_callback_.Run();
}
void SharedWorkerMessageFilter::OnCreateWorker(

Powered by Google App Engine
This is Rietveld 408576698