Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: blimp/common/proto/input.proto

Issue 1426993008: Serialize a subset of WebInputEvents to protobufs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused type enum Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | blimp/net/BUILD.gn » ('j') | blimp/net/DEPS » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 generally carries web input events. Currently we
8 // Feel free to modify this interface as necessary during feature work. 8 // just serialize the 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 message GestureBaseProperties {
Wez 2015/11/23 22:41:41 nit: I'd rename this GestureBase given the context
David Trainor- moved to gerrit 2015/11/24 20:08:27 Yeah I think that's a good idea. Will change.
19 optional CoordinatePair target = 1; 19 optional int64 x = 1;
20 optional int64 y = 2;
21 optional int64 global_x = 3;
22 optional int64 global_y = 4;
20 } 23 }
21 24
22 message DragArgs { 25 message GestureScrollBegin {
23 optional CoordinatePair origin = 1; 26 optional GestureBaseProperties base = 1;
24 optional CoordinatePair destination = 2; 27 optional float delta_x_hint = 2;
25 optional CoordinatePair elastic_overscroll = 3; 28 optional float delta_y_hint = 3;
29 optional bool target_viewport = 4;
30 }
31
32 message GestureScrollEnd {
33 optional GestureBaseProperties base = 1;
34 }
35
36 message GestureScrollUpdate {
37 optional GestureBaseProperties base = 1;
38 optional float delta_x = 2;
39 optional float delta_y = 3;
40 optional float velocity_x = 4;
41 optional float velocity_y = 5;
42 optional bool previous_update_in_sequence_prevented = 6;
43 optional bool prevent_propagation = 7;
44 optional bool inertial = 8;
45 }
46
47 message GestureFlingStart {
48 optional GestureBaseProperties base = 1;
49 optional float velocity_x = 2;
50 optional float velocity_y = 3;
51 optional bool target_viewport = 4;
52 }
53
54 message GestureFlingCancel {
55 optional GestureBaseProperties base = 1;
56 optional bool prevent_boosting = 2;
57 }
58
59 message GestureTap {
60 optional GestureBaseProperties base = 1;
61 optional int32 tap_count = 2;
62 optional float width = 3;
63 optional float height = 4;
64 }
65
66 message GesturePinchBegin {
67 optional GestureBaseProperties base = 1;
68 }
69
70 message GesturePinchEnd {
71 optional GestureBaseProperties base = 1;
72 }
73
74 message GesturePinchUpdate {
75 optional GestureBaseProperties base = 1;
76 optional bool zoom_disabled = 2;
77 optional float scale = 3;
26 } 78 }
27 79
28 message InputMessage { 80 message InputMessage {
29 enum Type { 81 enum Type {
30 CLICK = 1; 82 // This is a subset of WebGestureType events. We only support a small set
31 DRAG = 2; 83 // of these with the existing protocol.
Rick Byers 2015/11/20 03:17:55 Blink may make assumptions that this subset violat
84 Type_GestureScrollBegin = 1;
85 Type_GestureScrollEnd = 2;
86 Type_GestureScrollUpdate = 3;
87 Type_GestureFlingStart = 4;
88 Type_GestureFlingCancel = 5;
89 Type_GestureTap = 6;
90 Type_GesturePinchBegin = 7;
91 Type_GesturePinchEnd = 8;
92 Type_GesturePinchUpdate = 9;
32 } 93 }
94
33 optional Type type = 1; 95 optional Type type = 1;
34 96
35 optional ClickArgs click = 1000; 97 // The time this input event happened relative to when the client device was
36 optional DragArgs drag = 1001; 98 // started.
Wez 2015/11/23 22:41:41 nit: Is this to when the _device_ started, or when
nyquist 2015/11/24 08:12:43 In fact, given all the different ways to measure t
David Trainor- moved to gerrit 2015/11/24 20:08:27 Sadly it looks like it is SystemCLock#uptimeMillis
nyquist 2015/11/24 20:33:27 Oh; that might be unfortunate. That clock is also
99 optional double timestamp_seconds = 2;
100
101 // Input event specific messages follow.
102 // Only one of these fields may be set per InputMessage.
Wez 2015/11/23 22:41:41 nit: Add a TODO() to make these a oneof if Chromiu
David Trainor- moved to gerrit 2015/11/24 20:08:27 Done.
103 optional GestureScrollBegin gesture_scroll_begin = 3;
104 optional GestureScrollEnd gesture_scroll_end = 4;
105 optional GestureScrollUpdate gesture_scroll_update = 5;
106 optional GestureFlingStart gesture_fling_start = 6;
107 optional GestureFlingCancel gesture_fling_cancel = 7;
108 optional GestureTap gesture_tap = 8;
109 optional GesturePinchBegin gesture_pinch_begin = 9;
110 optional GesturePinchEnd gesture_pinch_end = 10;
111 optional GesturePinchUpdate gesture_pinch_update = 11;
37 } 112 }
38 113
OLDNEW
« no previous file with comments | « no previous file | blimp/net/BUILD.gn » ('j') | blimp/net/DEPS » ('J')

Powered by Google App Engine
This is Rietveld 408576698