Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1318)

Unified Diff: ppapi/proxy/ppp_input_event_proxy.cc

Issue 252663002: Track plugin input event latency (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add more comments Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/ppp_input_event_proxy.cc
diff --git a/ppapi/proxy/ppp_input_event_proxy.cc b/ppapi/proxy/ppp_input_event_proxy.cc
index cbf6a63ad2af96069735b1517db93d20327b2055..689f08c09ec20570466ab42f4c4487ea25921b0a 100644
--- a/ppapi/proxy/ppp_input_event_proxy.cc
+++ b/ppapi/proxy/ppp_input_event_proxy.cc
@@ -7,10 +7,12 @@
#include "ppapi/c/ppp_input_event.h"
#include "ppapi/proxy/host_dispatcher.h"
#include "ppapi/proxy/plugin_dispatcher.h"
+#include "ppapi/proxy/plugin_globals.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/shared_impl/ppb_input_event_shared.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_input_event_api.h"
+#include "ui/events/latency_info.h"
using ppapi::thunk::EnterResourceNoLock;
using ppapi::thunk::PPB_InputEvent_API;
@@ -90,6 +92,7 @@ bool PPP_InputEvent_Proxy::OnMessageReceived(const IPC::Message& msg) {
void PPP_InputEvent_Proxy::OnMsgHandleInputEvent(PP_Instance instance,
const InputEventData& data) {
+ PluginGlobals::Get()->AddLatencyInfo(data.latency_info, instance);
scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared(
OBJECT_IS_PROXY, instance, data));
CallWhileUnlocked(ppp_input_event_impl_->HandleInputEvent,
@@ -101,6 +104,7 @@ void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent(
PP_Instance instance,
const InputEventData& data,
PP_Bool* result) {
+ PluginGlobals::Get()->AddLatencyInfo(data.latency_info, instance);
scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared(
OBJECT_IS_PROXY, instance, data));
*result = CallWhileUnlocked(ppp_input_event_impl_->HandleInputEvent,

Powered by Google App Engine
This is Rietveld 408576698