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

Side by Side Diff: content/renderer/pepper/ppb_broker_impl.cc

Issue 283623002: Add support for passing an arbitrary parameter to an IPC message handler. The motivation is for Web… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/pepper/ppb_broker_impl.h" 5 #include "content/renderer/pepper/ppb_broker_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/common/view_messages.h" 8 #include "content/common/view_messages.h"
9 #include "content/renderer/pepper/common.h" 9 #include "content/renderer/pepper/common.h"
10 #include "content/renderer/pepper/host_globals.h" 10 #include "content/renderer/pepper/host_globals.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 // Synchronous calls are not supported. 118 // Synchronous calls are not supported.
119 DCHECK(TrackedCallback::IsPending(connect_callback_)); 119 DCHECK(TrackedCallback::IsPending(connect_callback_));
120 120
121 connect_callback_->Run(result); 121 connect_callback_->Run(result);
122 } 122 }
123 123
124 bool PPB_Broker_Impl::OnMessageReceived(const IPC::Message& message) { 124 bool PPB_Broker_Impl::OnMessageReceived(const IPC::Message& message) {
125 bool handled = true; 125 bool handled = true;
126 IPC_BEGIN_MESSAGE_MAP(PPB_Broker_Impl, message) 126 IPC_BEGIN_MESSAGE_MAP(PPB_Broker_Impl, message)
127 IPC_MESSAGE_HANDLER(ViewMsg_PpapiBrokerChannelCreated, 127 IPC_MESSAGE_HANDLER(ViewMsg_PpapiBrokerChannelCreated,
128 OnPpapiBrokerChannelCreated) 128 OnPpapiBrokerChannelCreated)
129 IPC_MESSAGE_HANDLER(ViewMsg_PpapiBrokerPermissionResult, 129 IPC_MESSAGE_HANDLER(ViewMsg_PpapiBrokerPermissionResult,
130 OnPpapiBrokerPermissionResult) 130 OnPpapiBrokerPermissionResult)
131 IPC_MESSAGE_UNHANDLED(handled = false) 131 IPC_MESSAGE_UNHANDLED(handled = false)
132 IPC_END_MESSAGE_MAP() 132 IPC_END_MESSAGE_MAP()
133 return handled; 133 return handled;
134 } 134 }
135 135
136 void PPB_Broker_Impl::OnPpapiBrokerChannelCreated( 136 void PPB_Broker_Impl::OnPpapiBrokerChannelCreated(
137 base::ProcessId broker_pid, 137 base::ProcessId broker_pid,
138 const IPC::ChannelHandle& handle) { 138 const IPC::ChannelHandle& handle) {
139 broker_->OnBrokerChannelConnected(broker_pid, handle); 139 broker_->OnBrokerChannelConnected(broker_pid, handle);
140 } 140 }
141 141
142 void PPB_Broker_Impl::OnPpapiBrokerPermissionResult(bool result) { 142 void PPB_Broker_Impl::OnPpapiBrokerPermissionResult(bool result) {
143 broker_->OnBrokerPermissionResult(this, result); 143 broker_->OnBrokerPermissionResult(this, result);
144 } 144 }
145 145
146 } // namespace content 146 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698