OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "ppapi/c/private/ppb_testing_private.h" | 8 #include "ppapi/c/private/ppb_testing_private.h" |
9 #include "ppapi/proxy/enter_proxy.h" | 9 #include "ppapi/proxy/enter_proxy.h" |
10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 ProxyAutoLock lock; | 120 ProxyAutoLock lock; |
121 RawVarDataGraph::SetMinimumArrayBufferSizeForShmemForTest(threshold); | 121 RawVarDataGraph::SetMinimumArrayBufferSizeForShmemForTest(threshold); |
122 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); | 122 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); |
123 if (!dispatcher) | 123 if (!dispatcher) |
124 return; | 124 return; |
125 dispatcher->Send( | 125 dispatcher->Send( |
126 new PpapiHostMsg_PPBTesting_SetMinimumArrayBufferSizeForShmem( | 126 new PpapiHostMsg_PPBTesting_SetMinimumArrayBufferSizeForShmem( |
127 API_ID_PPB_TESTING, threshold)); | 127 API_ID_PPB_TESTING, threshold)); |
128 } | 128 } |
129 | 129 |
| 130 void RunV8GC(PP_Instance instance) { |
| 131 // TODO(raymes): Implement this if we need it. |
| 132 NOTIMPLEMENTED(); |
| 133 } |
| 134 |
130 const PPB_Testing_Private testing_interface = { | 135 const PPB_Testing_Private testing_interface = { |
131 &ReadImageData, | 136 &ReadImageData, |
132 &RunMessageLoop, | 137 &RunMessageLoop, |
133 &QuitMessageLoop, | 138 &QuitMessageLoop, |
134 &GetLiveObjectsForInstance, | 139 &GetLiveObjectsForInstance, |
135 &IsOutOfProcess, | 140 &IsOutOfProcess, |
136 &SimulateInputEvent, | 141 &SimulateInputEvent, |
137 &GetDocumentURL, | 142 &GetDocumentURL, |
138 &GetLiveVars, | 143 &GetLiveVars, |
139 &SetMinimumArrayBufferSizeForShmem | 144 &SetMinimumArrayBufferSizeForShmem, |
| 145 &RunV8GC |
140 }; | 146 }; |
141 | 147 |
142 } // namespace | 148 } // namespace |
143 | 149 |
144 PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher) | 150 PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher) |
145 : InterfaceProxy(dispatcher), | 151 : InterfaceProxy(dispatcher), |
146 ppb_testing_impl_(NULL) { | 152 ppb_testing_impl_(NULL) { |
147 if (!dispatcher->IsPlugin()) { | 153 if (!dispatcher->IsPlugin()) { |
148 ppb_testing_impl_ = static_cast<const PPB_Testing_Private*>( | 154 ppb_testing_impl_ = static_cast<const PPB_Testing_Private*>( |
149 dispatcher->local_get_interface()(PPB_TESTING_PRIVATE_INTERFACE)); | 155 dispatcher->local_get_interface()(PPB_TESTING_PRIVATE_INTERFACE)); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 input_event_impl->pp_resource()); | 215 input_event_impl->pp_resource()); |
210 } | 216 } |
211 | 217 |
212 void PPB_Testing_Proxy::OnMsgSetMinimumArrayBufferSizeForShmem( | 218 void PPB_Testing_Proxy::OnMsgSetMinimumArrayBufferSizeForShmem( |
213 uint32_t threshold) { | 219 uint32_t threshold) { |
214 RawVarDataGraph::SetMinimumArrayBufferSizeForShmemForTest(threshold); | 220 RawVarDataGraph::SetMinimumArrayBufferSizeForShmemForTest(threshold); |
215 } | 221 } |
216 | 222 |
217 } // namespace proxy | 223 } // namespace proxy |
218 } // namespace ppapi | 224 } // namespace ppapi |
OLD | NEW |