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

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

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Eliminate unnecessary PostTask 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 375cf1ad154ea64b6d4448d0cfbaa8ef8016f309..3ce454404291182d634157660656cab3a96c4d6e 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);
@@ -86,7 +84,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