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

Side by Side Diff: content/browser/message_port_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/message_port_message_filter.h" 5 #include "content/browser/message_port_message_filter.h"
6 6
7 #include "content/browser/message_port_service.h" 7 #include "content/browser/message_port_service.h"
8 #include "content/common/message_port_messages.h" 8 #include "content/common/message_port_messages.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 MessagePortMessageFilter::MessagePortMessageFilter( 12 MessagePortMessageFilter::MessagePortMessageFilter(
13 const NextRoutingIDCallback& callback) 13 const NextRoutingIDCallback& callback)
14 : BrowserMessageFilter(MessagePortMsgStart), 14 : next_routing_id_(callback) {
15 next_routing_id_(callback) {
16 } 15 }
17 16
18 MessagePortMessageFilter::~MessagePortMessageFilter() { 17 MessagePortMessageFilter::~MessagePortMessageFilter() {
19 } 18 }
20 19
21 void MessagePortMessageFilter::OnChannelClosing() { 20 void MessagePortMessageFilter::OnChannelClosing() {
22 MessagePortService::GetInstance()->OnMessagePortMessageFilterClosing(this); 21 MessagePortService::GetInstance()->OnMessagePortMessageFilterClosing(this);
23 } 22 }
24 23
25 bool MessagePortMessageFilter::OnMessageReceived(const IPC::Message& message, 24 bool MessagePortMessageFilter::OnMessageReceived(const IPC::Message& message,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return next_routing_id_.Run(); 56 return next_routing_id_.Run();
58 } 57 }
59 58
60 void MessagePortMessageFilter::OnCreateMessagePort(int *route_id, 59 void MessagePortMessageFilter::OnCreateMessagePort(int *route_id,
61 int* message_port_id) { 60 int* message_port_id) {
62 *route_id = next_routing_id_.Run(); 61 *route_id = next_routing_id_.Run();
63 MessagePortService::GetInstance()->Create(*route_id, this, message_port_id); 62 MessagePortService::GetInstance()->Create(*route_id, this, message_port_id);
64 } 63 }
65 64
66 } // namespace content 65 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/android/browser_demuxer_android.cc ('k') | content/browser/mime_registry_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698