| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Multiply-included message file, no include guard. | 5 // Multiply-included message file, no include guard. |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ipc/ipc_message_macros.h" | 11 #include "ipc/ipc_message_macros.h" |
| 12 #include "ui/events/event_constants.h" | 12 #include "ui/events/event_constants.h" |
| 13 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 14 #include "ui/metro_viewer/ime_types.h" | 14 #include "ui/metro_viewer/ime_types.h" |
| 15 | 15 |
| 16 #define IPC_MESSAGE_START MetroViewerMsgStart | 16 #define IPC_MESSAGE_START MetroViewerMsgStart |
| 17 | 17 |
| 18 IPC_ENUM_TRAITS(ui::EventType) |
| 19 IPC_ENUM_TRAITS(ui::EventFlags) |
| 20 |
| 21 // Contains the parameters sent for a mousebutton message. |
| 22 IPC_STRUCT_BEGIN(MetroViewerHostMsg_MouseButtonParams) |
| 23 |
| 24 IPC_STRUCT_MEMBER(int32_t, x) |
| 25 IPC_STRUCT_MEMBER(int32_t, y) |
| 26 IPC_STRUCT_MEMBER(int32_t, extra) |
| 27 IPC_STRUCT_MEMBER(ui::EventType, event_type) |
| 28 IPC_STRUCT_MEMBER(uint32_t, flags) |
| 29 IPC_STRUCT_MEMBER(ui::EventFlags, changed_button) |
| 30 IPC_STRUCT_MEMBER(bool, is_horizontal_wheel) |
| 31 |
| 32 IPC_STRUCT_END() |
| 33 |
| 18 // Messages sent from the viewer to the browser: | 34 // Messages sent from the viewer to the browser: |
| 19 | 35 |
| 20 // Inform the browser of the surface to target for compositing. | 36 // Inform the browser of the surface to target for compositing. |
| 21 IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_SetTargetSurface, | 37 IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_SetTargetSurface, |
| 22 gfx::NativeViewId /* target hwnd */, | 38 gfx::NativeViewId /* target hwnd */, |
| 23 float /* device scale */) | 39 float /* device scale */) |
| 24 // Informs the browser that the mouse moved. | 40 // Informs the browser that the mouse moved. |
| 25 IPC_MESSAGE_CONTROL3(MetroViewerHostMsg_MouseMoved, | 41 IPC_MESSAGE_CONTROL3(MetroViewerHostMsg_MouseMoved, |
| 26 int32_t, /* x-coordinate */ | 42 int32_t, /* x-coordinate */ |
| 27 int32_t, /* y-coordinate */ | 43 int32_t, /* y-coordinate */ |
| 28 int32_t /* flags */) | 44 int32_t /* flags */) |
| 45 // Informs the brower that a mouse button was pressed. |
| 46 IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_MouseButton, |
| 47 MetroViewerHostMsg_MouseButtonParams) |
| 29 // Informs the browser that a key was pressed. | 48 // Informs the browser that a key was pressed. |
| 30 IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_KeyDown, | 49 IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_KeyDown, |
| 31 uint32_t, /* virtual key */ | 50 uint32_t, /* virtual key */ |
| 32 uint32_t, /* repeat count */ | 51 uint32_t, /* repeat count */ |
| 33 uint32_t, /* scan code */ | 52 uint32_t, /* scan code */ |
| 34 uint32_t /* key state */) | 53 uint32_t /* key state */) |
| 35 // Informs the browser that a key was released. | 54 // Informs the browser that a key was released. |
| 36 IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_KeyUp, | 55 IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_KeyUp, |
| 37 uint32_t, /* virtual key */ | 56 uint32_t, /* virtual key */ |
| 38 uint32_t, /* repeat count */ | 57 uint32_t, /* repeat count */ |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 IPC_STRUCT_TRAITS_MEMBER(right) | 219 IPC_STRUCT_TRAITS_MEMBER(right) |
| 201 IPC_STRUCT_TRAITS_MEMBER(bottom) | 220 IPC_STRUCT_TRAITS_MEMBER(bottom) |
| 202 IPC_STRUCT_TRAITS_END() | 221 IPC_STRUCT_TRAITS_END() |
| 203 | 222 |
| 204 // Requests the viewer to update the document context such as attached | 223 // Requests the viewer to update the document context such as attached |
| 205 // InputScopes and character bounds. | 224 // InputScopes and character bounds. |
| 206 IPC_MESSAGE_CONTROL2( | 225 IPC_MESSAGE_CONTROL2( |
| 207 MetroViewerHostMsg_ImeTextInputClientUpdated, | 226 MetroViewerHostMsg_ImeTextInputClientUpdated, |
| 208 std::vector<int32_t>, /* InputScope enums */ | 227 std::vector<int32_t>, /* InputScope enums */ |
| 209 std::vector<metro_viewer::CharacterBounds>) /* character bounds */ | 228 std::vector<metro_viewer::CharacterBounds>) /* character bounds */ |
| OLD | NEW |