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

Unified Diff: ppapi/proxy/ppapi_messages.h

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/ppapi_messages.h
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index e099b36709f4f179bbe684adc8ae80c08d766860..4040263f042c5107a088a8e0f64c1c1080cc316c 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -73,6 +73,11 @@
#include "ppapi/shared_impl/socket_option_data.h"
#include "ppapi/shared_impl/url_request_info_data.h"
#include "ppapi/shared_impl/url_response_info_data.h"
+#include "ui/events/latency_info.h"
+
+#if !defined(OS_NACL)
+#include "content/common/content_param_traits_macros.h"
+#endif
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT PPAPI_PROXY_EXPORT
@@ -121,6 +126,25 @@ IPC_ENUM_TRAITS(PP_VideoDecodeError_Dev)
IPC_ENUM_TRAITS(PP_VideoDecoder_Profile)
IPC_ENUM_TRAITS_MAX_VALUE(PP_VideoFrame_Format, PP_VIDEOFRAME_FORMAT_LAST)
+// Copied from "content/common/content_param_traits_macros.h"
+// We can eliminate the duplication if we have a content_common_nacl.gyp build.
piman 2014/04/25 01:59:43 Can we just move the definition into some, say, ui
Yufeng Shen (Slow to review) 2014/05/01 21:29:52 moved it into ui/events/latency_info_param_traits
+#if defined(OS_NACL)
+IPC_ENUM_TRAITS_MAX_VALUE(ui::LatencyComponentType,
+ ui::LATENCY_COMPONENT_TYPE_LAST)
+
+IPC_STRUCT_TRAITS_BEGIN(ui::LatencyInfo::LatencyComponent)
+ IPC_STRUCT_TRAITS_MEMBER(sequence_number)
+ IPC_STRUCT_TRAITS_MEMBER(event_time)
+ IPC_STRUCT_TRAITS_MEMBER(event_count)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(ui::LatencyInfo)
+ IPC_STRUCT_TRAITS_MEMBER(latency_components)
+ IPC_STRUCT_TRAITS_MEMBER(trace_id)
+ IPC_STRUCT_TRAITS_MEMBER(terminated)
+IPC_STRUCT_TRAITS_END()
+#endif // defined(OS_NACL)
+
IPC_STRUCT_TRAITS_BEGIN(PP_Point)
IPC_STRUCT_TRAITS_MEMBER(x)
IPC_STRUCT_TRAITS_MEMBER(y)
@@ -300,6 +324,7 @@ IPC_STRUCT_TRAITS_BEGIN(ppapi::InputEventData)
IPC_STRUCT_TRAITS_MEMBER(touches)
IPC_STRUCT_TRAITS_MEMBER(changed_touches)
IPC_STRUCT_TRAITS_MEMBER(target_touches)
+ IPC_STRUCT_TRAITS_MEMBER(latency_info)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(ppapi::HostPortPair)
@@ -1417,7 +1442,8 @@ IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_SetScale,
float /* scale */)
// Graphics2D, plugin -> host -> plugin
-IPC_MESSAGE_CONTROL0(PpapiHostMsg_Graphics2D_Flush)
+IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_Flush,
+ std::vector<ui::LatencyInfo> /* latency_info */)
IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Graphics2D_FlushAck)
IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_ReadImageData,

Powered by Google App Engine
This is Rietveld 408576698