Chromium Code Reviews| Index: blimp/common/proto/input.proto |
| diff --git a/blimp/common/proto/input.proto b/blimp/common/proto/input.proto |
| index 8e793e787c051d33977f39ff6cc796b64cafb9f3..4ef29b53a446e287307e66711acce29375fe8cf2 100644 |
| --- a/blimp/common/proto/input.proto |
| +++ b/blimp/common/proto/input.proto |
| @@ -4,8 +4,8 @@ |
| // |
| // Message definitions for the input subprotocol. |
| // |
| -// Current definitions are just placeholders and are NOT final. |
| -// Feel free to modify this interface as necessary during feature work. |
| +// The InputMessage protobuf is a serialized representation of the |
| +// 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.
|
| syntax = "proto2"; |
| @@ -15,24 +15,123 @@ import "common.proto"; |
| package blimp; |
| -message ClickArgs { |
| - optional CoordinatePair target = 1; |
| +// See blink::WebGestureDevice at |
| +// third_party/WebKit/public/platform/WebGestureDevice.h. |
| +enum WebGestureDevice { |
|
David Trainor- moved to gerrit
2015/11/19 00:49:43
Ended up removing this. We'll only be using Touch
|
| + WebGestureDevice_Uninitialized = 0; |
| + 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.
|
| + WebGestureDevice_Touchscreen = 2; |
|
Wez
2015/11/18 02:18:32
nit: TouchScreen
David Trainor- moved to gerrit
2015/11/18 08:26:30
Done.
|
| } |
| -message DragArgs { |
| - optional CoordinatePair origin = 1; |
| - optional CoordinatePair destination = 2; |
| - optional CoordinatePair elastic_overscroll = 3; |
| +// See blink::WebGestureEvent at third_party/WebKit/public/web/WebInputEvent.h. |
| +// The inner messages represent the |data| union structs in WebGestureEvent. |
| +message GestureArgs { |
| + message Tap { |
| + optional int32 tap_count = 1; |
| + optional float width = 2; |
| + optional float height = 3; |
| + } |
| + |
| + message TapDown { |
| + optional float width = 1; |
| + optional float height = 2; |
| + } |
| + |
| + 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
|
| + optional float width = 1; |
| + optional float height = 2; |
| + } |
| + |
| + 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
|
| + optional float width = 1; |
| + optional float height = 2; |
| + } |
| + |
| + message TwoFingerTap { |
| + optional float first_finger_width = 1; |
| + optional float first_finger_height = 2; |
| + } |
| + |
| + message ScrollBegin { |
| + optional float delta_x_hint = 1; |
| + optional float delta_y_hint = 2; |
| + optional bool target_viewport = 3; |
| + } |
| + |
| + message ScrollUpdate { |
| + optional float delta_x = 1; |
| + optional float delta_y = 2; |
| + optional float velocity_x = 3; |
| + optional float velocity_y = 4; |
| + optional bool previous_update_in_sequence_prevented = 5; |
| + optional bool prevent_propagation = 6; |
| + optional bool inertial = 7; |
| + } |
| + |
| + message FlingStart { |
| + optional float velocity_x = 1; |
| + optional float velocity_y = 2; |
| + optional bool target_viewport = 3; |
| + } |
| + |
| + message FlingCancel { |
| + optional bool prevent_boosting = 1; |
| + } |
| + |
| + message PinchUpdate { |
| + optional bool zoom_disabled = 1; |
| + optional float scale = 2; |
| + } |
| + |
| + optional int64 x = 1; |
| + optional int64 y = 2; |
| + optional int64 global_x = 3; |
| + optional int64 global_y = 4; |
| + optional WebGestureDevice source_device = 5; |
| + |
| + // Purposely omitting WebGestureEvent::resendingPluginId. |
| + |
| + // Tap represents GestureTap, GestureTapUnconfirmed, and GestureDoubleTap. |
| + optional Tap tap = 1000; |
| + optional TapDown tap_down = 1001; |
| + optional ShowPress show_press = 1002; |
| + optional LongPress long_press = 1003; |
| + optional TwoFingerTap two_finger_tap = 1004; |
| + optional ScrollBegin scroll_begin = 1005; |
| + optional ScrollUpdate scroll_update = 1006; |
| + optional FlingStart fling_start = 1007; |
| + optional FlingCancel fling_cancel = 1008; |
| + optional PinchUpdate pinch_update = 1009; |
| } |
| +// See blink::WebInputEvent at third_party/WebKit/public/web/WebInputEvent.h. |
| message InputMessage { |
| enum Type { |
| - CLICK = 1; |
| - DRAG = 2; |
| + Type_Undefined = -1; |
| + |
| + // TODO(dtrainor): Support other types of WebInputEvents in the future? |
| + Type_GestureScrollBegin = 1; |
| + Type_GestureScrollEnd = 2; |
| + Type_GestureScrollUpdate = 3; |
| + Type_GestureFlingStart = 4; |
| + Type_GestureFlingCancel = 5; |
| + Type_GestureShowPress = 6; |
| + Type_GestureTap = 7; |
| + Type_GestureTapUnconfirmed = 8; |
| + Type_GestureTapDown = 9; |
| + Type_GestureTapCancel = 10; |
| + Type_GestureDoubleTap = 11; |
| + Type_GestureTwoFingerTap = 12; |
| + Type_GestureLongPress = 13; |
| + Type_GestureLongTap = 14; |
| + Type_GesturePinchBegin = 15; |
| + Type_GesturePinchEnd = 16; |
| + Type_GesturePinchUpdate = 17; |
| } |
| + |
| optional Type type = 1; |
| + 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
|
| - optional ClickArgs click = 1000; |
| - optional DragArgs drag = 1001; |
| + 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
|
| } |