Chromium Code Reviews| Index: ppapi/proxy/ppb_testing_proxy.cc |
| diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc |
| index 167a91e843bb09789a1fcafe48a44d53668d3912..28d237172173351f5ce13c611de2f8229c4b9522 100644 |
| --- a/ppapi/proxy/ppb_testing_proxy.cc |
| +++ b/ppapi/proxy/ppb_testing_proxy.cc |
| @@ -114,6 +114,18 @@ uint32_t GetLiveVars(PP_Var live_vars[], uint32_t array_size) { |
| return vars.size(); |
| } |
| +void SetMinimumArrayBufferSizeForShmem(PP_Instance instance, |
| + uint32_t threshhold) { |
|
teravest
2013/04/18 20:15:04
s/threshhold/threshold/ throughout
raymes
2013/04/18 20:29:55
Done.
|
| + ProxyAutoLock lock; |
| + RawVarDataGraph::SetMinimumArrayBufferSizeForShmemForTest(threshhold); |
| + PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); |
| + if (!dispatcher) |
| + return; |
| + dispatcher->Send( |
| + new PpapiHostMsg_PPBTesting_SetMinimumArrayBufferSizeForShmem( |
| + API_ID_PPB_TESTING, threshhold)); |
| +} |
| + |
| const PPB_Testing_Dev testing_interface = { |
| &ReadImageData, |
| &RunMessageLoop, |
| @@ -122,7 +134,8 @@ const PPB_Testing_Dev testing_interface = { |
| &IsOutOfProcess, |
| &SimulateInputEvent, |
| &GetDocumentURL, |
| - &GetLiveVars |
| + &GetLiveVars, |
| + &SetMinimumArrayBufferSizeForShmem |
| }; |
| InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher) { |
| @@ -167,6 +180,9 @@ bool PPB_Testing_Proxy::OnMessageReceived(const IPC::Message& msg) { |
| OnMsgGetLiveObjectsForInstance) |
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_SimulateInputEvent, |
| OnMsgSimulateInputEvent) |
| + IPC_MESSAGE_HANDLER( |
| + PpapiHostMsg_PPBTesting_SetMinimumArrayBufferSizeForShmem, |
| + OnMsgSetMinimumArrayBufferSizeForShmem) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| IPC_END_MESSAGE_MAP() |
| return handled; |
| @@ -203,5 +219,10 @@ void PPB_Testing_Proxy::OnMsgSimulateInputEvent( |
| input_event_impl->pp_resource()); |
| } |
| +void PPB_Testing_Proxy::OnMsgSetMinimumArrayBufferSizeForShmem( |
| + uint32_t threshhold) { |
| + RawVarDataGraph::SetMinimumArrayBufferSizeForShmemForTest(threshhold); |
| +} |
| + |
| } // namespace proxy |
| } // namespace ppapi |