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

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

Issue 1450423002: Add glue between the client and engine for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blimp_ipc2
Patch Set: Fix build break Created 5 years 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 | « blimp/common/proto/BUILD.gn ('k') | blimp/common/proto/common.proto » ('j') | no next file with comments »
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 // 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'.
22 21
23 syntax = "proto2"; 22 syntax = "proto2";
24 23
25 option optimize_for = LITE_RUNTIME; 24 option optimize_for = LITE_RUNTIME;
26 25
27 import "control.proto"; 26 import "control.proto";
28 import "compositor.proto"; 27 import "compositor.proto";
29 import "input.proto"; 28 import "input.proto";
30 import "navigation.proto"; 29 import "navigation.proto";
30 import "render_widget.proto";
31 31
32 package blimp; 32 package blimp;
33 33
34 message BlimpMessage { 34 message BlimpMessage {
35 enum Type { 35 enum Type {
36 UNKNOWN = 0; 36 UNKNOWN = 0;
37 COMPOSITOR = 1; 37 CONTROL = 1;
38 INPUT = 2; 38 NAVIGATION = 2;
39 CONTROL = 3; 39 RENDER_WIDGET = 3;
40 NAVIGATION = 4; 40 INPUT = 4;
41 COMPOSITOR = 5;
41 } 42 }
42 // Identifies the feature type of this message. 43 // Identifies the feature type of this message.
43 // The feature-specific contents are contained in optional fields of the same 44 // The feature-specific contents are contained in optional fields of the same
44 // name (example: use |compositor| field for type=COMPOSITOR.) 45 // name (example: use |compositor| field for type=COMPOSITOR.)
45 optional Type type = 1; 46 optional Type type = 1;
46 47
47 // Uniquely identifies the Blimp session that originated this message. 48 // Uniquely identifies the Blimp session that originated this message.
48 // Session IDs are invalidated whenever new sessions are created. 49 // Session IDs are invalidated whenever new sessions are created.
49 // If a message's |session_id| does not match the client's session ID, 50 // If a message's |session_id| does not match the client's session ID,
50 // then the message may have originated from a discarded session and can be 51 // then the message may have originated from a discarded session and can be
51 // safely ignored. 52 // safely ignored.
52 optional int32 session_id = 2; 53 optional int32 session_id = 2;
53 54
54 // ID of the tab that is referenced by this message. 55 // ID of the tab that is referenced by this message.
55 // Messages that are tab-agnostic may leave this field unset. 56 // Messages that are tab-agnostic may leave this field unset.
56 optional int32 target_tab_id = 3; 57 optional int32 target_tab_id = 3;
57 58
58 // Feature-specific messages follow. 59 // Feature-specific messages follow.
59 // Only one of these fields may be set per BlimpMessage. 60 // Only one of these fields may be set per BlimpMessage.
60 // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. 61 // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium.
61 optional CompositorMessage compositor = 1000; 62 optional ControlMessage control = 1000;
62 optional InputMessage input = 1001; 63 optional NavigationMessage navigation = 1001;
63 optional ControlMessage control = 1002; 64 optional RenderWidgetMessage render_widget = 1002;
64 optional NavigationMessage navigation = 1003; 65 optional InputMessage input = 1003;
66 optional CompositorMessage compositor = 1004;
65 } 67 }
66 68
OLDNEW
« no previous file with comments | « blimp/common/proto/BUILD.gn ('k') | blimp/common/proto/common.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698