Index: ppapi/proxy/ppb_testing_proxy.cc |
diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc |
index 914eb4486de31f7652e904818d7cf78efab826bc..8a3b20d1ef7e9783beabdd9a76d44f76120a5e04 100644 |
--- a/ppapi/proxy/ppb_testing_proxy.cc |
+++ b/ppapi/proxy/ppb_testing_proxy.cc |
@@ -92,6 +92,18 @@ PP_Bool IsPeripheral(PP_Instance instance_id) { |
return result; |
} |
+PP_Bool IsThrottled(PP_Instance instance_id) { |
+ ProxyAutoLock lock; |
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance_id); |
+ if (!dispatcher) |
+ return PP_FALSE; |
+ |
+ PP_Bool result = PP_FALSE; |
+ dispatcher->Send(new PpapiHostMsg_PPBTesting_IsThrottled( |
+ API_ID_PPB_TESTING, instance_id, &result)); |
+ return result; |
+} |
+ |
void SimulateInputEvent(PP_Instance instance_id, PP_Resource input_event) { |
ProxyAutoLock lock; |
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance_id); |
@@ -151,6 +163,7 @@ const PPB_Testing_Private testing_interface = { |
&GetLiveObjectsForInstance, |
&IsOutOfProcess, |
&IsPeripheral, |
+ &IsThrottled, |
&SimulateInputEvent, |
&GetDocumentURL, |
&GetLiveVars, |
@@ -187,6 +200,7 @@ bool PPB_Testing_Proxy::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance, |
OnMsgGetLiveObjectsForInstance) |
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_IsPeripheral, OnMsgIsPeripheral) |
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_IsThrottled, OnMsgIsThrottled) |
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_SimulateInputEvent, |
OnMsgSimulateInputEvent) |
IPC_MESSAGE_HANDLER( |
@@ -224,6 +238,11 @@ void PPB_Testing_Proxy::OnMsgIsPeripheral(PP_Instance instance, |
*result = ppb_testing_impl_->IsPeripheral(instance); |
} |
+void PPB_Testing_Proxy::OnMsgIsThrottled(PP_Instance instance, |
+ PP_Bool* result) { |
+ *result = ppb_testing_impl_->IsThrottled(instance); |
+} |
+ |
void PPB_Testing_Proxy::OnMsgSimulateInputEvent( |
PP_Instance instance, |
const InputEventData& input_event) { |