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

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

Issue 9361065: reland 121901, PPAPI: Add unlocking for PPP calls and callbacks... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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 "ppapi/proxy/ppp_instance_private_proxy.h" 5 #include "ppapi/proxy/ppp_instance_private_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ppapi/c/pp_var.h" 9 #include "ppapi/c/pp_var.h"
10 #include "ppapi/c/private/ppp_instance_private.h" 10 #include "ppapi/c/private/ppp_instance_private.h"
11 #include "ppapi/proxy/host_dispatcher.h" 11 #include "ppapi/proxy/host_dispatcher.h"
12 #include "ppapi/proxy/plugin_dispatcher.h" 12 #include "ppapi/proxy/plugin_dispatcher.h"
13 #include "ppapi/proxy/plugin_resource_tracker.h" 13 #include "ppapi/proxy/plugin_resource_tracker.h"
14 #include "ppapi/proxy/ppapi_messages.h" 14 #include "ppapi/proxy/ppapi_messages.h"
15 #include "ppapi/shared_impl/proxy_lock.h"
15 16
16 namespace ppapi { 17 namespace ppapi {
17 namespace proxy { 18 namespace proxy {
18 19
19 namespace { 20 namespace {
20 21
21 PP_Var GetInstanceObject(PP_Instance instance) { 22 PP_Var GetInstanceObject(PP_Instance instance) {
22 Dispatcher* dispatcher = HostDispatcher::GetForInstance(instance); 23 Dispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
23 ReceiveSerializedVarReturnValue result; 24 ReceiveSerializedVarReturnValue result;
24 dispatcher->Send(new PpapiMsg_PPPInstancePrivate_GetInstanceObject( 25 dispatcher->Send(new PpapiMsg_PPPInstancePrivate_GetInstanceObject(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 OnMsgGetInstanceObject) 68 OnMsgGetInstanceObject)
68 IPC_MESSAGE_UNHANDLED(handled = false) 69 IPC_MESSAGE_UNHANDLED(handled = false)
69 IPC_END_MESSAGE_MAP() 70 IPC_END_MESSAGE_MAP()
70 return handled; 71 return handled;
71 } 72 }
72 73
73 void PPP_Instance_Private_Proxy::OnMsgGetInstanceObject( 74 void PPP_Instance_Private_Proxy::OnMsgGetInstanceObject(
74 PP_Instance instance, 75 PP_Instance instance,
75 SerializedVarReturnValue result) { 76 SerializedVarReturnValue result) {
76 result.Return(dispatcher(), 77 result.Return(dispatcher(),
77 ppp_instance_private_impl_->GetInstanceObject(instance)); 78 CallWhileUnlocked(ppp_instance_private_impl_->GetInstanceObject,
79 instance));
78 } 80 }
79 81
80 } // namespace proxy 82 } // namespace proxy
81 } // namespace ppapi 83 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_input_event_proxy.cc ('k') | ppapi/proxy/ppp_instance_private_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698