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

Side by Side Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 6810013: Add sync context dispatch restriction (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix flaky test Created 9 years, 8 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 | « no previous file | ipc/ipc_sync_channel.h » ('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) 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/renderer/pepper_plugin_delegate_impl.h" 5 #include "content/renderer/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 PP_Module pp_module, 314 PP_Module pp_module,
315 pp::proxy::Dispatcher::GetInterfaceFunc local_get_interface) { 315 pp::proxy::Dispatcher::GetInterfaceFunc local_get_interface) {
316 dispatcher_.reset(new pp::proxy::HostDispatcher( 316 dispatcher_.reset(new pp::proxy::HostDispatcher(
317 plugin_process_handle, pp_module, local_get_interface)); 317 plugin_process_handle, pp_module, local_get_interface));
318 318
319 if (!dispatcher_->InitWithChannel(PepperPluginRegistry::GetInstance(), 319 if (!dispatcher_->InitWithChannel(PepperPluginRegistry::GetInstance(),
320 channel_handle, true)) { 320 channel_handle, true)) {
321 dispatcher_.reset(); 321 dispatcher_.reset();
322 return false; 322 return false;
323 } 323 }
324 dispatcher_->channel()->SetRestrictDispatchToSameChannel(true);
324 return true; 325 return true;
325 } 326 }
326 327
327 } // namespace 328 } // namespace
328 329
329 PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderView* render_view) 330 PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderView* render_view)
330 : render_view_(render_view), 331 : render_view_(render_view),
331 has_saved_context_menu_action_(false), 332 has_saved_context_menu_action_(false),
332 saved_context_menu_action_(0), 333 saved_context_menu_action_(0),
333 id_generator_(0) { 334 id_generator_(0) {
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 } 876 }
876 877
877 void PepperPluginDelegateImpl::HasUnsupportedFeature() { 878 void PepperPluginDelegateImpl::HasUnsupportedFeature() {
878 render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature( 879 render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature(
879 render_view_->routing_id())); 880 render_view_->routing_id()));
880 } 881 }
881 882
882 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() { 883 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() {
883 return render_view_->p2p_socket_dispatcher(); 884 return render_view_->p2p_socket_dispatcher();
884 } 885 }
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_sync_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698