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_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 | 15 |
16 namespace pp { | 16 namespace ppapi { |
17 namespace proxy { | 17 namespace proxy { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 PP_Var GetInstanceObject(PP_Instance instance) { | 21 PP_Var GetInstanceObject(PP_Instance instance) { |
22 Dispatcher* dispatcher = HostDispatcher::GetForInstance(instance); | 22 Dispatcher* dispatcher = HostDispatcher::GetForInstance(instance); |
23 ReceiveSerializedVarReturnValue result; | 23 ReceiveSerializedVarReturnValue result; |
24 dispatcher->Send(new PpapiMsg_PPPInstancePrivate_GetInstanceObject( | 24 dispatcher->Send(new PpapiMsg_PPPInstancePrivate_GetInstanceObject( |
25 INTERFACE_ID_PPP_INSTANCE_PRIVATE, instance, &result)); | 25 INTERFACE_ID_PPP_INSTANCE_PRIVATE, instance, &result)); |
26 return result.Return(dispatcher); | 26 return result.Return(dispatcher); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 void PPP_Instance_Private_Proxy::OnMsgGetInstanceObject( | 70 void PPP_Instance_Private_Proxy::OnMsgGetInstanceObject( |
71 PP_Instance instance, | 71 PP_Instance instance, |
72 SerializedVarReturnValue result) { | 72 SerializedVarReturnValue result) { |
73 result.Return(dispatcher(), | 73 result.Return(dispatcher(), |
74 ppp_instance_private_target()->GetInstanceObject(instance)); | 74 ppp_instance_private_target()->GetInstanceObject(instance)); |
75 } | 75 } |
76 | 76 |
77 } // namespace proxy | 77 } // namespace proxy |
78 } // namespace pp | 78 } // namespace ppapi |
OLD | NEW |