OLD | NEW |
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 Loading... |
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 |
OLD | NEW |