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

Side by Side Diff: ppapi/proxy/ppp_graphics_3d_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
« no previous file with comments | « ppapi/proxy/ppp_class_proxy.cc ('k') | ppapi/proxy/ppp_input_event_proxy.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) 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_graphics_3d_proxy.h" 5 #include "ppapi/proxy/ppp_graphics_3d_proxy.h"
6 6
7 #include "ppapi/c/ppp_graphics_3d.h" 7 #include "ppapi/c/ppp_graphics_3d.h"
8 #include "ppapi/proxy/host_dispatcher.h" 8 #include "ppapi/proxy/host_dispatcher.h"
9 #include "ppapi/proxy/plugin_dispatcher.h" 9 #include "ppapi/proxy/plugin_dispatcher.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
11 #include "ppapi/shared_impl/proxy_lock.h"
11 12
12 namespace ppapi { 13 namespace ppapi {
13 namespace proxy { 14 namespace proxy {
14 15
15 namespace { 16 namespace {
16 17
17 void ContextLost(PP_Instance instance) { 18 void ContextLost(PP_Instance instance) {
18 HostDispatcher::GetForInstance(instance)->Send( 19 HostDispatcher::GetForInstance(instance)->Send(
19 new PpapiMsg_PPPGraphics3D_ContextLost(API_ID_PPP_GRAPHICS_3D, instance)); 20 new PpapiMsg_PPPGraphics3D_ContextLost(API_ID_PPP_GRAPHICS_3D, instance));
20 } 21 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 IPC_BEGIN_MESSAGE_MAP(PPP_Graphics3D_Proxy, msg) 59 IPC_BEGIN_MESSAGE_MAP(PPP_Graphics3D_Proxy, msg)
59 IPC_MESSAGE_HANDLER(PpapiMsg_PPPGraphics3D_ContextLost, 60 IPC_MESSAGE_HANDLER(PpapiMsg_PPPGraphics3D_ContextLost,
60 OnMsgContextLost) 61 OnMsgContextLost)
61 IPC_MESSAGE_UNHANDLED(handled = false) 62 IPC_MESSAGE_UNHANDLED(handled = false)
62 IPC_END_MESSAGE_MAP() 63 IPC_END_MESSAGE_MAP()
63 return handled; 64 return handled;
64 } 65 }
65 66
66 void PPP_Graphics3D_Proxy::OnMsgContextLost(PP_Instance instance) { 67 void PPP_Graphics3D_Proxy::OnMsgContextLost(PP_Instance instance) {
67 if (ppp_graphics_3d_impl_) 68 if (ppp_graphics_3d_impl_)
68 ppp_graphics_3d_impl_->Graphics3DContextLost(instance); 69 CallWhileUnlocked(ppp_graphics_3d_impl_->Graphics3DContextLost, instance);
69 } 70 }
70 71
71 } // namespace proxy 72 } // namespace proxy
72 } // namespace ppapi 73 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_class_proxy.cc ('k') | ppapi/proxy/ppp_input_event_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698