| 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 |
| 66 const PPB_Testing_Dev testing_interface = { | 70 const PPB_Testing_Dev testing_interface = { |
| 67 &ReadImageData, | 71 &ReadImageData, |
| 68 &RunMessageLoop, | 72 &RunMessageLoop, |
| 69 &QuitMessageLoop, | 73 &QuitMessageLoop, |
| 70 &GetLiveObjectsForInstance | 74 &GetLiveObjectsForInstance, |
| 75 &IsOutOfProcess |
| 71 }; | 76 }; |
| 72 | 77 |
| 73 InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher, | 78 InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher, |
| 74 const void* target_interface) { | 79 const void* target_interface) { |
| 75 return new PPB_Testing_Proxy(dispatcher, target_interface); | 80 return new PPB_Testing_Proxy(dispatcher, target_interface); |
| 76 } | 81 } |
| 77 | 82 |
| 78 } // namespace | 83 } // namespace |
| 79 | 84 |
| 80 PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher, | 85 PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 ppb_testing_target()->QuitMessageLoop(instance); | 131 ppb_testing_target()->QuitMessageLoop(instance); |
| 127 } | 132 } |
| 128 | 133 |
| 129 void PPB_Testing_Proxy::OnMsgGetLiveObjectsForInstance(PP_Instance instance, | 134 void PPB_Testing_Proxy::OnMsgGetLiveObjectsForInstance(PP_Instance instance, |
| 130 uint32_t* result) { | 135 uint32_t* result) { |
| 131 *result = ppb_testing_target()->GetLiveObjectsForInstance(instance); | 136 *result = ppb_testing_target()->GetLiveObjectsForInstance(instance); |
| 132 } | 137 } |
| 133 | 138 |
| 134 } // namespace proxy | 139 } // namespace proxy |
| 135 } // namespace ppapi | 140 } // namespace ppapi |
| OLD | NEW |