Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Message definitions for the input subprotocol. | 5 // Message definitions for the input subprotocol. |
| 6 // | 6 // |
| 7 // Current definitions are just placeholders and are NOT final. | 7 // The InputMessage protobuf is a serialized representation of the |
| 8 // Feel free to modify this interface as necessary during feature work. | 8 // blink::WebInputEvent POD struct. |
| 9 | 9 |
| 10 syntax = "proto2"; | 10 syntax = "proto2"; |
| 11 | 11 |
| 12 option optimize_for = LITE_RUNTIME; | 12 option optimize_for = LITE_RUNTIME; |
| 13 | 13 |
| 14 import "common.proto"; | 14 import "common.proto"; |
| 15 | 15 |
| 16 package blimp; | 16 package blimp; |
| 17 | 17 |
| 18 message ClickArgs { | 18 enum WebGestureDevice { |
| 19 optional CoordinatePair target = 1; | 19 WebGestureDevice_Uninitialized = 0; |
| 20 WebGestureDevice_Touchpad = 1; | |
| 21 WebGestureDevice_Touchscreen = 2; | |
| 20 } | 22 } |
| 21 | 23 |
|
Kevin M
2015/11/12 00:53:50
It would be nice to reference the Blink analogues
David Trainor- moved to gerrit
2015/11/12 16:34:28
Done.
| |
| 22 message DragArgs { | 24 message GestureArgs { |
| 23 optional CoordinatePair origin = 1; | 25 message Tap { |
| 24 optional CoordinatePair destination = 2; | 26 optional int32 tap_count = 1; |
| 25 optional CoordinatePair elastic_overscroll = 3; | 27 optional float width = 2; |
| 28 optional float height = 3; | |
| 29 } | |
| 30 | |
| 31 message TapDown { | |
| 32 optional float width = 1; | |
| 33 optional float height = 2; | |
| 34 } | |
| 35 | |
| 36 message ShowPress { | |
| 37 optional float width = 1; | |
| 38 optional float height = 2; | |
| 39 } | |
| 40 | |
| 41 message LongPress { | |
| 42 optional float width = 1; | |
| 43 optional float height = 2; | |
| 44 } | |
| 45 | |
| 46 message TwoFingerTap { | |
| 47 optional float first_finger_width = 1; | |
| 48 optional float first_finger_height = 2; | |
| 49 } | |
| 50 | |
| 51 message ScrollBegin { | |
| 52 optional float delta_x_hint = 1; | |
| 53 optional float delta_y_hint = 2; | |
| 54 optional bool target_viewport = 3; | |
| 55 } | |
| 56 | |
| 57 message ScrollUpdate { | |
| 58 optional float delta_x = 1; | |
| 59 optional float delta_y = 2; | |
| 60 optional float velocity_x = 3; | |
| 61 optional float velocity_y = 4; | |
| 62 optional bool previous_update_in_sequence_prevented = 5; | |
| 63 optional bool prevent_propagation = 6; | |
| 64 optional bool inertial = 7; | |
| 65 } | |
| 66 | |
| 67 message FlingStart { | |
| 68 optional float velocity_x = 1; | |
| 69 optional float velocity_y = 2; | |
| 70 optional bool target_viewport = 3; | |
| 71 } | |
| 72 | |
| 73 message FlingCancel { | |
| 74 optional bool prevent_boosting = 1; | |
| 75 } | |
| 76 | |
| 77 message PinchUpdate { | |
| 78 optional bool zoom_disabled = 1; | |
| 79 optional float scale = 2; | |
| 80 } | |
| 81 | |
| 82 optional int64 x = 1; | |
| 83 optional int64 y = 2; | |
| 84 optional int64 global_x = 3; | |
| 85 optional int64 global_y = 4; | |
| 86 optional WebGestureDevice source_device = 5; | |
| 87 | |
| 88 // Purposely omitting WebGestureEvent::resendingPluginId. | |
| 89 | |
| 90 // Tap represents GestureTap, GestureTapUnconfirmed, and GestureDoubleTap. | |
| 91 optional Tap tap = 1000; | |
| 92 optional TapDown tap_down = 1001; | |
| 93 optional ShowPress show_press = 1002; | |
| 94 optional LongPress long_press = 1003; | |
| 95 optional TwoFingerTap two_finger_tap = 1004; | |
| 96 optional ScrollBegin scroll_begin = 1005; | |
| 97 optional ScrollUpdate scroll_update = 1006; | |
| 98 optional FlingStart fling_start = 1007; | |
| 99 optional FlingCancel fling_cancel = 1008; | |
| 100 optional PinchUpdate pinch_update = 1009; | |
| 26 } | 101 } |
| 27 | 102 |
| 28 message InputMessage { | 103 message InputMessage { |
| 29 enum Type { | 104 enum Type { |
| 30 CLICK = 1; | 105 Type_Undefined = -1; |
| 31 DRAG = 2; | 106 |
| 107 // TODO(dtrainor): Support other types of WebInputEvents in the future? | |
| 108 Type_GestureScrollBegin = 1; | |
| 109 Type_GestureScrollEnd = 2; | |
| 110 Type_GestureScrollUpdate = 3; | |
| 111 Type_GestureFlingStart = 4; | |
| 112 Type_GestureFlingCancel = 5; | |
| 113 Type_GestureShowPress = 6; | |
| 114 Type_GestureTap = 7; | |
| 115 Type_GestureTapUnconfirmed = 8; | |
| 116 Type_GestureTapDown = 9; | |
| 117 Type_GestureTapCancel = 10; | |
| 118 Type_GestureDoubleTap = 11; | |
| 119 Type_GestureTwoFingerTap = 12; | |
| 120 Type_GestureLongPress = 13; | |
| 121 Type_GestureLongTap = 14; | |
| 122 Type_GesturePinchBegin = 15; | |
| 123 Type_GesturePinchEnd = 16; | |
| 124 Type_GesturePinchUpdate = 17; | |
| 32 } | 125 } |
| 126 | |
| 33 optional Type type = 1; | 127 optional Type type = 1; |
| 128 optional double timestamp_seconds = 2; | |
| 34 | 129 |
| 35 optional ClickArgs click = 1000; | 130 optional GestureArgs gesture = 1000; |
| 36 optional DragArgs drag = 1001; | |
| 37 } | 131 } |
| 38 | 132 |
| OLD | NEW |