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

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

Issue 1422363008: Add a basic UI to the Android Blimp client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused icon 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
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 // Contains the BlimpMessage proto which frames all messages sent over Blimp 5 // Contains the BlimpMessage proto which frames all messages sent over Blimp
6 // subchannels. BlimpMessage protos are serialized and transmitted over the 6 // subchannels. BlimpMessage protos are serialized and transmitted over the
7 // wire to the Blimplet server. 7 // wire to the Blimplet server.
8 // 8 //
9 // Each BlimpMessage has a few identifying fields which provide the browser 9 // Each BlimpMessage has a few identifying fields which provide the browser
10 // session and tab ID as context. The message details are stored in a 10 // session and tab ID as context. The message details are stored in a
11 // feature-specific field (see field IDs 1000 and onward). 11 // feature-specific field (see field IDs 1000 and onward).
12 // The |type| field tells the receiving end how the BlimpMessage should 12 // The |type| field tells the receiving end how the BlimpMessage should
13 // be unpacked and which component it should be routed to. 13 // be unpacked and which component it should be routed to.
14 // 14 //
15 // CONVENTIONS: 15 // CONVENTIONS:
16 // * A BlimpMessage can contain only one feature message. 16 // * A BlimpMessage can contain only one feature message.
17 // * Feature message protos are placed in their own files. 17 // * Feature message protos are placed in their own files.
18 // * Features are applied to unidirectional channels. Client->server and 18 // * Features are applied to unidirectional channels. Client->server and
19 // server->client channels for a component should be broken out as distinct 19 // server->client channels for a component should be broken out as distinct
20 // features, even if they are conceptually similar. 20 // features, even if they are conceptually similar.
21 // * Shared proto types are contained in 'common.proto'. 21 // * Shared proto types are contained in 'common.proto'.
22 22
23 syntax = "proto2"; 23 syntax = "proto2";
24 24
25 option optimize_for = LITE_RUNTIME; 25 option optimize_for = LITE_RUNTIME;
26 26
27 import "control.proto"; 27 import "control.proto";
28 import "compositor.proto"; 28 import "compositor.proto";
29 import "input.proto"; 29 import "input.proto";
30 import "navigation.proto";
30 31
31 package blimp; 32 package blimp;
32 33
33 message BlimpMessage { 34 message BlimpMessage {
34 enum Type { 35 enum Type {
35 COMPOSITOR = 0; 36 COMPOSITOR = 0;
36 INPUT = 1; 37 INPUT = 1;
37 CONTROL = 2; 38 CONTROL = 2;
39 NAVIGATION = 3;
38 } 40 }
39 // Identifies the feature type of this message. 41 // Identifies the feature type of this message.
40 // The feature-specific contents are contained in optional fields of the same 42 // The feature-specific contents are contained in optional fields of the same
41 // name (example: use |compositor| field for type=COMPOSITOR.) 43 // name (example: use |compositor| field for type=COMPOSITOR.)
42 optional Type type = 1; 44 optional Type type = 1;
43 45
44 // Uniquely identifies the Blimp session that originated this message. 46 // Uniquely identifies the Blimp session that originated this message.
45 // Session IDs are invalidated whenever new sessions are created. 47 // Session IDs are invalidated whenever new sessions are created.
46 // If a message's |session_id| does not match the client's session ID, 48 // If a message's |session_id| does not match the client's session ID,
47 // then the message may have originated from a discarded session and can be 49 // then the message may have originated from a discarded session and can be
48 // safely ignored. 50 // safely ignored.
49 optional int32 session_id = 2; 51 optional int32 session_id = 2;
50 52
51 // ID of the tab that is referenced by this message. 53 // ID of the tab that is referenced by this message.
52 // Messages that are tab-agnostic may leave this field unset. 54 // Messages that are tab-agnostic may leave this field unset.
53 optional int32 target_tab_id = 3; 55 optional int32 target_tab_id = 3;
54 56
55 // Feature-specific messages follow. 57 // Feature-specific messages follow.
56 // Only one of these fields may be set per BlimpMessage. 58 // Only one of these fields may be set per BlimpMessage.
57 // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. 59 // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium.
58 optional CompositorMessage compositor = 1000; 60 optional CompositorMessage compositor = 1000;
59 optional InputMessage input = 1001; 61 optional InputMessage input = 1001;
60 optional ControlMessage control = 1002; 62 optional ControlMessage control = 1002;
63 optional NavigationMessage navigation = 1003;
61 } 64 }
62 65
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698