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. |
|
Wez
2015/11/18 02:18:32
nit: That's an implementation detail of this early
David Trainor- moved to gerrit
2015/11/18 08:26:30
Done.
| |
| 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 // See blink::WebGestureDevice at |
| 19 optional CoordinatePair target = 1; | 19 // third_party/WebKit/public/platform/WebGestureDevice.h. |
| 20 enum WebGestureDevice { | |
|
David Trainor- moved to gerrit
2015/11/19 00:49:43
Ended up removing this. We'll only be using Touch
| |
| 21 WebGestureDevice_Uninitialized = 0; | |
| 22 WebGestureDevice_Touchpad = 1; | |
|
Wez
2015/11/18 02:18:32
nit: TouchPad
David Trainor- moved to gerrit
2015/11/18 08:26:30
oddly they aren't capitalized in the WebKit file.
| |
| 23 WebGestureDevice_Touchscreen = 2; | |
|
Wez
2015/11/18 02:18:32
nit: TouchScreen
David Trainor- moved to gerrit
2015/11/18 08:26:30
Done.
| |
| 20 } | 24 } |
| 21 | 25 |
| 22 message DragArgs { | 26 // See blink::WebGestureEvent at third_party/WebKit/public/web/WebInputEvent.h. |
| 23 optional CoordinatePair origin = 1; | 27 // The inner messages represent the |data| union structs in WebGestureEvent. |
| 24 optional CoordinatePair destination = 2; | 28 message GestureArgs { |
| 25 optional CoordinatePair elastic_overscroll = 3; | 29 message Tap { |
| 30 optional int32 tap_count = 1; | |
| 31 optional float width = 2; | |
| 32 optional float height = 3; | |
| 33 } | |
| 34 | |
| 35 message TapDown { | |
| 36 optional float width = 1; | |
| 37 optional float height = 2; | |
| 38 } | |
| 39 | |
| 40 message ShowPress { | |
|
Wez
2015/11/18 02:18:32
nit: As below; what does this event actually mean
David Trainor- moved to gerrit
2015/11/18 08:26:30
Mystery! So we rely on a Chromium class to build
David Trainor- moved to gerrit
2015/11/19 00:49:43
Got rid of all of the events we didn't explicitly
Rick Byers
2015/11/20 03:12:53
ShowPress it the event that triggers link highligh
| |
| 41 optional float width = 1; | |
| 42 optional float height = 2; | |
| 43 } | |
| 44 | |
| 45 message LongPress { | |
|
Wez
2015/11/18 02:18:32
nit: Where/when is this used? We omitted it from t
David Trainor- moved to gerrit
2015/11/18 08:26:30
I don't know what Blink does with it (although thi
Rick Byers
2015/11/20 03:12:53
LongPress is used to trigger text selection and co
| |
| 46 optional float width = 1; | |
| 47 optional float height = 2; | |
| 48 } | |
| 49 | |
| 50 message TwoFingerTap { | |
| 51 optional float first_finger_width = 1; | |
| 52 optional float first_finger_height = 2; | |
| 53 } | |
| 54 | |
| 55 message ScrollBegin { | |
| 56 optional float delta_x_hint = 1; | |
| 57 optional float delta_y_hint = 2; | |
| 58 optional bool target_viewport = 3; | |
| 59 } | |
| 60 | |
| 61 message ScrollUpdate { | |
| 62 optional float delta_x = 1; | |
| 63 optional float delta_y = 2; | |
| 64 optional float velocity_x = 3; | |
| 65 optional float velocity_y = 4; | |
| 66 optional bool previous_update_in_sequence_prevented = 5; | |
| 67 optional bool prevent_propagation = 6; | |
| 68 optional bool inertial = 7; | |
| 69 } | |
| 70 | |
| 71 message FlingStart { | |
| 72 optional float velocity_x = 1; | |
| 73 optional float velocity_y = 2; | |
| 74 optional bool target_viewport = 3; | |
| 75 } | |
| 76 | |
| 77 message FlingCancel { | |
| 78 optional bool prevent_boosting = 1; | |
| 79 } | |
| 80 | |
| 81 message PinchUpdate { | |
| 82 optional bool zoom_disabled = 1; | |
| 83 optional float scale = 2; | |
| 84 } | |
| 85 | |
| 86 optional int64 x = 1; | |
| 87 optional int64 y = 2; | |
| 88 optional int64 global_x = 3; | |
| 89 optional int64 global_y = 4; | |
| 90 optional WebGestureDevice source_device = 5; | |
| 91 | |
| 92 // Purposely omitting WebGestureEvent::resendingPluginId. | |
| 93 | |
| 94 // Tap represents GestureTap, GestureTapUnconfirmed, and GestureDoubleTap. | |
| 95 optional Tap tap = 1000; | |
| 96 optional TapDown tap_down = 1001; | |
| 97 optional ShowPress show_press = 1002; | |
| 98 optional LongPress long_press = 1003; | |
| 99 optional TwoFingerTap two_finger_tap = 1004; | |
| 100 optional ScrollBegin scroll_begin = 1005; | |
| 101 optional ScrollUpdate scroll_update = 1006; | |
| 102 optional FlingStart fling_start = 1007; | |
| 103 optional FlingCancel fling_cancel = 1008; | |
| 104 optional PinchUpdate pinch_update = 1009; | |
| 26 } | 105 } |
| 27 | 106 |
| 107 // See blink::WebInputEvent at third_party/WebKit/public/web/WebInputEvent.h. | |
| 28 message InputMessage { | 108 message InputMessage { |
| 29 enum Type { | 109 enum Type { |
| 30 CLICK = 1; | 110 Type_Undefined = -1; |
| 31 DRAG = 2; | 111 |
| 112 // TODO(dtrainor): Support other types of WebInputEvents in the future? | |
| 113 Type_GestureScrollBegin = 1; | |
| 114 Type_GestureScrollEnd = 2; | |
| 115 Type_GestureScrollUpdate = 3; | |
| 116 Type_GestureFlingStart = 4; | |
| 117 Type_GestureFlingCancel = 5; | |
| 118 Type_GestureShowPress = 6; | |
| 119 Type_GestureTap = 7; | |
| 120 Type_GestureTapUnconfirmed = 8; | |
| 121 Type_GestureTapDown = 9; | |
| 122 Type_GestureTapCancel = 10; | |
| 123 Type_GestureDoubleTap = 11; | |
| 124 Type_GestureTwoFingerTap = 12; | |
| 125 Type_GestureLongPress = 13; | |
| 126 Type_GestureLongTap = 14; | |
| 127 Type_GesturePinchBegin = 15; | |
| 128 Type_GesturePinchEnd = 16; | |
| 129 Type_GesturePinchUpdate = 17; | |
| 32 } | 130 } |
| 131 | |
| 33 optional Type type = 1; | 132 optional Type type = 1; |
| 133 optional double timestamp_seconds = 2; | |
|
Wez
2015/11/18 02:18:32
What is this relative to..?
David Trainor- moved to gerrit
2015/11/18 08:26:30
Currently it is the time the event happened relati
| |
| 34 | 134 |
| 35 optional ClickArgs click = 1000; | 135 optional GestureArgs gesture = 1000; |
|
Wez
2015/11/18 02:18:32
Why give this such a high index? That just means i
David Trainor- moved to gerrit
2015/11/18 08:26:30
That seemed to be the standard we've been using ac
| |
| 36 optional DragArgs drag = 1001; | |
| 37 } | 136 } |
| 38 | 137 |
| OLD | NEW |