| 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.
|
|
|
| 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 {
|
| + WebGestureDevice_Uninitialized = 0;
|
| + WebGestureDevice_Touchpad = 1;
|
| + WebGestureDevice_Touchscreen = 2;
|
| }
|
|
|
| -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 {
|
| + optional float width = 1;
|
| + optional float height = 2;
|
| + }
|
| +
|
| + message LongPress {
|
| + 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;
|
|
|
| - optional ClickArgs click = 1000;
|
| - optional DragArgs drag = 1001;
|
| + optional GestureArgs gesture = 1000;
|
| }
|
|
|
|
|