| 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 // The InputMessage protobuf generally carries web gesture events. Currently we | 7 // The InputMessage protobuf generally carries web gesture events. Currently we |
| 8 // just serialize the blink::WebGestureEvent POD struct. | 8 // just serialize the blink::WebGestureEvent POD struct. |
| 9 | 9 |
| 10 syntax = "proto2"; | 10 syntax = "proto2"; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 optional int32 tap_count = 1; | 50 optional int32 tap_count = 1; |
| 51 optional float width = 2; | 51 optional float width = 2; |
| 52 optional float height = 3; | 52 optional float height = 3; |
| 53 } | 53 } |
| 54 | 54 |
| 55 message GesturePinchUpdate { | 55 message GesturePinchUpdate { |
| 56 optional bool zoom_disabled = 1; | 56 optional bool zoom_disabled = 1; |
| 57 optional float scale = 2; | 57 optional float scale = 2; |
| 58 } | 58 } |
| 59 | 59 |
| 60 message GestureTapDown { |
| 61 optional float width = 1; |
| 62 optional float height = 2; |
| 63 } |
| 64 |
| 65 message GestureShowPress { |
| 66 optional float width = 1; |
| 67 optional float height = 2; |
| 68 } |
| 69 |
| 60 message InputMessage { | 70 message InputMessage { |
| 61 enum Type { | 71 enum Type { |
| 62 UNKNOWN = 0; | 72 UNKNOWN = 0; |
| 63 | 73 |
| 64 // This is a subset of WebGestureType events. We only support a small set | 74 // This is a subset of WebGestureType events. We only support a small set |
| 65 // of these with the existing protocol. | 75 // of these with the existing protocol. |
| 66 // TODO(dtrainor): Modify these enum values to be consistent with the rest | 76 // TODO(dtrainor): Modify these enum values to be consistent with the rest |
| 67 // of BlimpMessage subtype enums. | 77 // of BlimpMessage subtype enums. |
| 68 Type_GestureScrollBegin = 1; | 78 Type_GestureScrollBegin = 1; |
| 69 Type_GestureScrollEnd = 2; | 79 Type_GestureScrollEnd = 2; |
| 70 Type_GestureScrollUpdate = 3; | 80 Type_GestureScrollUpdate = 3; |
| 71 Type_GestureFlingStart = 4; | 81 Type_GestureFlingStart = 4; |
| 72 Type_GestureFlingCancel = 5; | 82 Type_GestureFlingCancel = 5; |
| 73 Type_GestureTap = 6; | 83 Type_GestureTap = 6; |
| 74 Type_GesturePinchBegin = 7; | 84 Type_GesturePinchBegin = 7; |
| 75 Type_GesturePinchEnd = 8; | 85 Type_GesturePinchEnd = 8; |
| 76 Type_GesturePinchUpdate = 9; | 86 Type_GesturePinchUpdate = 9; |
| 87 Type_GestureTapDown = 10; |
| 88 Type_GestureTapCancel = 11; |
| 89 Type_GestureTapUnconfirmed = 12; |
| 90 Type_GestureShowPress = 13; |
| 77 } | 91 } |
| 78 | 92 |
| 79 optional Type type = 1; | 93 optional Type type = 1; |
| 80 | 94 |
| 81 // An ID that corresponds to RenderWidgetMessage.render_widget_id. | 95 // An ID that corresponds to RenderWidgetMessage.render_widget_id. |
| 82 optional int32 render_widget_id = 10; | 96 optional int32 render_widget_id = 2; |
| 83 | 97 |
| 84 // Seconds since client platform start (boot) with millisecond resolution. | 98 // Seconds since client platform start (boot) with millisecond resolution. |
| 85 // On Android, this is based off of the client's SystemClock#uptimeMillis(). | 99 // On Android, this is based off of the client's SystemClock#uptimeMillis(). |
| 86 optional double timestamp_seconds = 2; | 100 optional double timestamp_seconds = 3; |
| 87 | 101 |
| 88 optional GestureCommon gesture_common = 3; | 102 optional GestureCommon gesture_common = 4; |
| 89 | 103 |
| 90 // Input event specific messages follow. | 104 // Input event specific messages follow. |
| 91 // Only one of these fields may be set per InputMessage. | 105 // Only one of these fields may be set per InputMessage. |
| 92 // TODO(dtrainor): use a 'oneof' union when it's supported in Chromium. See | 106 // TODO(dtrainor): use a 'oneof' union when it's supported in Chromium. See |
| 93 // crbug.com/570371. | 107 // crbug.com/570371. |
| 94 optional GestureScrollBegin gesture_scroll_begin = 4; | 108 optional GestureScrollBegin gesture_scroll_begin = 5; |
| 95 optional GestureScrollUpdate gesture_scroll_update = 5; | 109 optional GestureScrollUpdate gesture_scroll_update = 6; |
| 96 optional GestureFlingStart gesture_fling_start = 6; | 110 optional GestureFlingStart gesture_fling_start = 7; |
| 97 optional GestureFlingCancel gesture_fling_cancel = 7; | 111 optional GestureFlingCancel gesture_fling_cancel = 8; |
| 98 optional GestureTap gesture_tap = 8; | 112 optional GestureTap gesture_tap = 9; |
| 99 optional GesturePinchUpdate gesture_pinch_update = 9; | 113 optional GesturePinchUpdate gesture_pinch_update = 10; |
| 114 optional GestureTapDown gesture_tap_down = 11; |
| 115 optional GestureShowPress gesture_show_press = 12; |
| 100 } | 116 } |
| OLD | NEW |