OLD | NEW |
1 // Copyright (c) 2012 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" | |
12 | 11 |
13 namespace ppapi { | 12 namespace ppapi { |
14 namespace proxy { | 13 namespace proxy { |
15 | 14 |
16 namespace { | 15 namespace { |
17 | 16 |
18 void ContextLost(PP_Instance instance) { | 17 void ContextLost(PP_Instance instance) { |
19 HostDispatcher::GetForInstance(instance)->Send( | 18 HostDispatcher::GetForInstance(instance)->Send( |
20 new PpapiMsg_PPPGraphics3D_ContextLost(API_ID_PPP_GRAPHICS_3D, instance)); | 19 new PpapiMsg_PPPGraphics3D_ContextLost(API_ID_PPP_GRAPHICS_3D, instance)); |
21 } | 20 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 IPC_BEGIN_MESSAGE_MAP(PPP_Graphics3D_Proxy, msg) | 58 IPC_BEGIN_MESSAGE_MAP(PPP_Graphics3D_Proxy, msg) |
60 IPC_MESSAGE_HANDLER(PpapiMsg_PPPGraphics3D_ContextLost, | 59 IPC_MESSAGE_HANDLER(PpapiMsg_PPPGraphics3D_ContextLost, |
61 OnMsgContextLost) | 60 OnMsgContextLost) |
62 IPC_MESSAGE_UNHANDLED(handled = false) | 61 IPC_MESSAGE_UNHANDLED(handled = false) |
63 IPC_END_MESSAGE_MAP() | 62 IPC_END_MESSAGE_MAP() |
64 return handled; | 63 return handled; |
65 } | 64 } |
66 | 65 |
67 void PPP_Graphics3D_Proxy::OnMsgContextLost(PP_Instance instance) { | 66 void PPP_Graphics3D_Proxy::OnMsgContextLost(PP_Instance instance) { |
68 if (ppp_graphics_3d_impl_) | 67 if (ppp_graphics_3d_impl_) |
69 CallWhileUnlocked(ppp_graphics_3d_impl_->Graphics3DContextLost, instance); | 68 ppp_graphics_3d_impl_->Graphics3DContextLost(instance); |
70 } | 69 } |
71 | 70 |
72 } // namespace proxy | 71 } // namespace proxy |
73 } // namespace ppapi | 72 } // namespace ppapi |
OLD | NEW |