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_testing_proxy.h" | 5 #include "ppapi/proxy/ppb_testing_proxy.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "ppapi/c/dev/ppb_testing_dev.h" | 8 #include "ppapi/c/dev/ppb_testing_dev.h" |
9 #include "ppapi/proxy/plugin_dispatcher.h" | 9 #include "ppapi/proxy/plugin_dispatcher.h" |
10 #include "ppapi/proxy/plugin_resource_tracker.h" | 10 #include "ppapi/proxy/plugin_resource_tracker.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance_id); | 56 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance_id); |
57 if (!dispatcher) | 57 if (!dispatcher) |
58 return static_cast<uint32_t>(-1); | 58 return static_cast<uint32_t>(-1); |
59 | 59 |
60 uint32_t result = 0; | 60 uint32_t result = 0; |
61 dispatcher->Send(new PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance( | 61 dispatcher->Send(new PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance( |
62 INTERFACE_ID_PPB_TESTING, instance_id, &result)); | 62 INTERFACE_ID_PPB_TESTING, instance_id, &result)); |
63 return result; | 63 return result; |
64 } | 64 } |
65 | 65 |
66 PP_Bool IsOutOfProcess() { | |
67 return PP_TRUE; | |
68 } | |
69 | |
70 const PPB_Testing_Dev testing_interface = { | 66 const PPB_Testing_Dev testing_interface = { |
71 &ReadImageData, | 67 &ReadImageData, |
72 &RunMessageLoop, | 68 &RunMessageLoop, |
73 &QuitMessageLoop, | 69 &QuitMessageLoop, |
74 &GetLiveObjectsForInstance, | 70 &GetLiveObjectsForInstance |
75 &IsOutOfProcess | |
76 }; | 71 }; |
77 | 72 |
78 InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher, | 73 InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher, |
79 const void* target_interface) { | 74 const void* target_interface) { |
80 return new PPB_Testing_Proxy(dispatcher, target_interface); | 75 return new PPB_Testing_Proxy(dispatcher, target_interface); |
81 } | 76 } |
82 | 77 |
83 } // namespace | 78 } // namespace |
84 | 79 |
85 PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher, | 80 PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 ppb_testing_target()->QuitMessageLoop(instance); | 126 ppb_testing_target()->QuitMessageLoop(instance); |
132 } | 127 } |
133 | 128 |
134 void PPB_Testing_Proxy::OnMsgGetLiveObjectsForInstance(PP_Instance instance, | 129 void PPB_Testing_Proxy::OnMsgGetLiveObjectsForInstance(PP_Instance instance, |
135 uint32_t* result) { | 130 uint32_t* result) { |
136 *result = ppb_testing_target()->GetLiveObjectsForInstance(instance); | 131 *result = ppb_testing_target()->GetLiveObjectsForInstance(instance); |
137 } | 132 } |
138 | 133 |
139 } // namespace proxy | 134 } // namespace proxy |
140 } // namespace ppapi | 135 } // namespace ppapi |
OLD | NEW |