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

Side by Side Diff: content/browser/worker_host/worker_message_filter.cc

Issue 165333004: Revert "Allow MessageFilters to restrict listening to specific message classes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/worker_host/worker_message_filter.h" 5 #include "content/browser/worker_host/worker_message_filter.h"
6 6
7 #include "content/browser/message_port_message_filter.h" 7 #include "content/browser/message_port_message_filter.h"
8 #include "content/browser/worker_host/worker_service_impl.h" 8 #include "content/browser/worker_host/worker_service_impl.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/common/worker_messages.h" 10 #include "content/common/worker_messages.h"
11 #include "content/public/browser/resource_context.h" 11 #include "content/public/browser/resource_context.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 WorkerMessageFilter::WorkerMessageFilter( 15 WorkerMessageFilter::WorkerMessageFilter(
16 int render_process_id, 16 int render_process_id,
17 ResourceContext* resource_context, 17 ResourceContext* resource_context,
18 const WorkerStoragePartition& partition, 18 const WorkerStoragePartition& partition,
19 MessagePortMessageFilter* message_port_message_filter) 19 MessagePortMessageFilter* message_port_message_filter)
20 : BrowserMessageFilter(ViewMsgStart), 20 : render_process_id_(render_process_id),
21 render_process_id_(render_process_id),
22 resource_context_(resource_context), 21 resource_context_(resource_context),
23 partition_(partition), 22 partition_(partition),
24 message_port_message_filter_(message_port_message_filter) { 23 message_port_message_filter_(message_port_message_filter) {
25 // Note: This constructor is called on both IO or UI thread. 24 // Note: This constructor is called on both IO or UI thread.
26 DCHECK(resource_context); 25 DCHECK(resource_context);
27 } 26 }
28 27
29 WorkerMessageFilter::~WorkerMessageFilter() { 28 WorkerMessageFilter::~WorkerMessageFilter() {
30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
31 } 30 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 66
68 void WorkerMessageFilter::OnForwardToWorker(const IPC::Message& message) { 67 void WorkerMessageFilter::OnForwardToWorker(const IPC::Message& message) {
69 WorkerServiceImpl::GetInstance()->ForwardToWorker(message, this); 68 WorkerServiceImpl::GetInstance()->ForwardToWorker(message, this);
70 } 69 }
71 70
72 void WorkerMessageFilter::OnDocumentDetached(unsigned long long document_id) { 71 void WorkerMessageFilter::OnDocumentDetached(unsigned long long document_id) {
73 WorkerServiceImpl::GetInstance()->DocumentDetached(document_id, this); 72 WorkerServiceImpl::GetInstance()->DocumentDetached(document_id, this);
74 } 73 }
75 74
76 } // namespace content 75 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/vibration/vibration_message_filter.cc ('k') | content/public/browser/browser_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698