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

Side by Side Diff: ppapi/proxy/plugin_dispatcher.cc

Issue 11722017: Use an explicit PID for duplicating Pepper handles rather than the Channel's. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.h ('k') | ppapi/proxy/plugin_main_nacl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/proxy/plugin_dispatcher.h" 5 #include "ppapi/proxy/plugin_dispatcher.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if (found == plugin_interfaces_.end()) { 148 if (found == plugin_interfaces_.end()) {
149 const void* ret = local_get_interface()(interface_name.c_str()); 149 const void* ret = local_get_interface()(interface_name.c_str());
150 plugin_interfaces_.insert(std::make_pair(interface_name, ret)); 150 plugin_interfaces_.insert(std::make_pair(interface_name, ret));
151 return ret; 151 return ret;
152 } 152 }
153 return found->second; 153 return found->second;
154 } 154 }
155 155
156 bool PluginDispatcher::InitPluginWithChannel( 156 bool PluginDispatcher::InitPluginWithChannel(
157 PluginDelegate* delegate, 157 PluginDelegate* delegate,
158 base::ProcessId peer_pid,
158 const IPC::ChannelHandle& channel_handle, 159 const IPC::ChannelHandle& channel_handle,
159 bool is_client) { 160 bool is_client) {
160 if (!Dispatcher::InitWithChannel(delegate, channel_handle, is_client)) 161 if (!Dispatcher::InitWithChannel(delegate, peer_pid, channel_handle,
162 is_client))
161 return false; 163 return false;
162 plugin_delegate_ = delegate; 164 plugin_delegate_ = delegate;
163 plugin_dispatcher_id_ = plugin_delegate_->Register(this); 165 plugin_dispatcher_id_ = plugin_delegate_->Register(this);
164 166
165 // The message filter will intercept and process certain messages directly 167 // The message filter will intercept and process certain messages directly
166 // on the I/O thread. 168 // on the I/O thread.
167 channel()->AddFilter( 169 channel()->AddFilter(
168 new PluginMessageFilter(delegate->GetGloballySeenInstanceIDSet())); 170 new PluginMessageFilter(delegate->GetGloballySeenInstanceIDSet()));
169 return true; 171 return true;
170 } 172 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 DLOG_IF(INFO, reply_params.sequence() != 0) 348 DLOG_IF(INFO, reply_params.sequence() != 0)
347 << "Pepper resource reply message received but the resource doesn't " 349 << "Pepper resource reply message received but the resource doesn't "
348 "exist (probably has been destroyed)."; 350 "exist (probably has been destroyed).";
349 return; 351 return;
350 } 352 }
351 resource->OnReplyReceived(reply_params, nested_msg); 353 resource->OnReplyReceived(reply_params, nested_msg);
352 } 354 }
353 355
354 } // namespace proxy 356 } // namespace proxy
355 } // namespace ppapi 357 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.h ('k') | ppapi/proxy/plugin_main_nacl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698