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/ppb_instance_proxy.h" | 5 #include "ppapi/proxy/ppb_instance_proxy.h" |
6 | 6 |
7 #include "ppapi/c/dev/ppb_fullscreen_dev.h" | 7 #include "ppapi/c/dev/ppb_fullscreen_dev.h" |
8 #include "ppapi/c/pp_var.h" | 8 #include "ppapi/c/pp_var.h" |
9 #include "ppapi/c/ppb_instance.h" | 9 #include "ppapi/c/ppb_instance.h" |
10 #include "ppapi/c/ppb_messaging.h" | 10 #include "ppapi/c/ppb_messaging.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/proxy/serialized_var.h" | 15 #include "ppapi/proxy/serialized_var.h" |
16 #include "ppapi/thunk/enter.h" | 16 #include "ppapi/thunk/enter.h" |
17 #include "ppapi/thunk/thunk.h" | 17 #include "ppapi/thunk/thunk.h" |
18 | 18 |
19 // Windows headers interfere with this file. | 19 // Windows headers interfere with this file. |
20 #ifdef PostMessage | 20 #ifdef PostMessage |
21 #undef PostMessage | 21 #undef PostMessage |
22 #endif | 22 #endif |
23 | 23 |
24 using ppapi::HostResource; | |
25 using ppapi::Resource; | |
26 using ppapi::thunk::EnterFunctionNoLock; | 24 using ppapi::thunk::EnterFunctionNoLock; |
27 using ppapi::thunk::EnterResourceNoLock; | 25 using ppapi::thunk::EnterResourceNoLock; |
28 using ppapi::thunk::PPB_Instance_FunctionAPI; | 26 using ppapi::thunk::PPB_Instance_FunctionAPI; |
29 | 27 |
30 namespace pp { | 28 namespace ppapi { |
31 namespace proxy { | 29 namespace proxy { |
32 | 30 |
33 namespace { | 31 namespace { |
34 | 32 |
35 InterfaceProxy* CreateInstanceProxy(Dispatcher* dispatcher, | 33 InterfaceProxy* CreateInstanceProxy(Dispatcher* dispatcher, |
36 const void* target_interface) { | 34 const void* target_interface) { |
37 return new PPB_Instance_Proxy(dispatcher, target_interface); | 35 return new PPB_Instance_Proxy(dispatcher, target_interface); |
38 } | 36 } |
39 | 37 |
40 } // namespace | 38 } // namespace |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } | 360 } |
363 | 361 |
364 void PPB_Instance_Proxy::OnMsgPostMessage(PP_Instance instance, | 362 void PPB_Instance_Proxy::OnMsgPostMessage(PP_Instance instance, |
365 SerializedVarReceiveInput message) { | 363 SerializedVarReceiveInput message) { |
366 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); | 364 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
367 if (enter.succeeded()) | 365 if (enter.succeeded()) |
368 enter.functions()->PostMessage(instance, message.Get(dispatcher())); | 366 enter.functions()->PostMessage(instance, message.Get(dispatcher())); |
369 } | 367 } |
370 | 368 |
371 } // namespace proxy | 369 } // namespace proxy |
372 } // namespace pp | 370 } // namespace ppapi |
OLD | NEW |