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

Unified Diff: ppapi/proxy/ppapi_messages.h

Issue 8413021: Add functions to generate input events to PPB_Testing_Dev. These make (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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
===================================================================
--- ppapi/proxy/ppapi_messages.h (revision 107150)
+++ ppapi/proxy/ppapi_messages.h (working copy)
@@ -19,16 +19,18 @@
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_platform_file.h"
#include "ppapi/c/dev/pp_video_capture_dev.h"
+#include "ppapi/c/dev/pp_video_dev.h"
#include "ppapi/c/dev/ppb_text_input_dev.h"
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_file_info.h"
+#include "ppapi/c/pp_input_event.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_point.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_size.h"
-#include "ppapi/c/dev/pp_video_dev.h"
+#include "ppapi/c/ppb_input_event.h"
#include "ppapi/c/private/ppb_flash_tcp_socket.h"
#include "ppapi/proxy/ppapi_param_traits.h"
#include "ppapi/proxy/ppapi_proxy_export.h"
@@ -44,11 +46,34 @@
#define IPC_MESSAGE_START PpapiMsgStart
IPC_ENUM_TRAITS(PP_InputEvent_Type)
+IPC_ENUM_TRAITS(PP_InputEvent_Modifier)
IPC_ENUM_TRAITS(PP_InputEvent_MouseButton)
IPC_ENUM_TRAITS(PP_TextInput_Type)
IPC_ENUM_TRAITS(PP_VideoDecoder_Profile)
IPC_ENUM_TRAITS(PP_VideoDecodeError_Dev)
+IPC_STRUCT_TRAITS_BEGIN(PP_InputEvent_Key)
+ IPC_STRUCT_TRAITS_MEMBER(modifier)
+ IPC_STRUCT_TRAITS_MEMBER(key_code)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(PP_InputEvent_Mouse)
+ IPC_STRUCT_TRAITS_MEMBER(modifier)
+ IPC_STRUCT_TRAITS_MEMBER(button)
+ IPC_STRUCT_TRAITS_MEMBER(x)
+ IPC_STRUCT_TRAITS_MEMBER(y)
+ IPC_STRUCT_TRAITS_MEMBER(click_count)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(PP_InputEvent_Wheel)
+ IPC_STRUCT_TRAITS_MEMBER(modifier)
+ IPC_STRUCT_TRAITS_MEMBER(delta_x)
+ IPC_STRUCT_TRAITS_MEMBER(delta_y)
+ IPC_STRUCT_TRAITS_MEMBER(wheel_ticks_x)
+ IPC_STRUCT_TRAITS_MEMBER(wheel_ticks_y)
+ IPC_STRUCT_TRAITS_MEMBER(scroll_by_page)
+IPC_STRUCT_TRAITS_END()
+
IPC_STRUCT_TRAITS_BEGIN(PP_Point)
IPC_STRUCT_TRAITS_MEMBER(x)
IPC_STRUCT_TRAITS_MEMBER(y)
@@ -956,6 +981,21 @@
IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance,
PP_Instance /* instance */,
uint32 /* result */)
+IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBTesting_GenerateKeyEvent,
+ PP_Instance /* instance */,
+ PP_InputEvent_Type /* type */,
+ PP_InputEvent_Key /* key_event */)
+IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBTesting_GenerateCharacterEvent,
+ PP_Instance /* instance */,
+ PP_InputEvent_Modifier /* modifier */,
+ std::string /* text */)
+IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBTesting_GenerateMouseEvent,
+ PP_Instance /* instance */,
+ PP_InputEvent_Type /* type */,
+ PP_InputEvent_Mouse /* mouse_event */)
+IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBTesting_GenerateWheelEvent,
+ PP_Instance /* instance */,
+ PP_InputEvent_Wheel /* wheel_event */)
dmichael (off chromium) 2011/10/28 16:02:22 What about sending the resource? Or if you want it
// PPB_TextInput.
IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBTextInput_SetTextInputType,

Powered by Google App Engine
This is Rietveld 408576698