Chromium Code Reviews| 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 // 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 | 21 |
| 22 syntax = "proto2"; | 22 syntax = "proto2"; |
| 23 | 23 |
| 24 option optimize_for = LITE_RUNTIME; | 24 option optimize_for = LITE_RUNTIME; |
| 25 | 25 |
| 26 import "compositor.proto"; | 26 import "compositor.proto"; |
| 27 import "ime.proto"; | |
| 27 import "input.proto"; | 28 import "input.proto"; |
| 28 import "navigation.proto"; | 29 import "navigation.proto"; |
| 29 import "render_widget.proto"; | 30 import "render_widget.proto"; |
| 30 import "protocol_control.proto"; | 31 import "protocol_control.proto"; |
| 31 import "tab_control.proto"; | 32 import "tab_control.proto"; |
| 32 | 33 |
| 33 package blimp; | 34 package blimp; |
| 34 | 35 |
| 35 message BlimpMessage { | 36 message BlimpMessage { |
| 36 enum Type { | 37 enum Type { |
| 37 UNKNOWN = 0; | 38 UNKNOWN = 0; |
| 38 TAB_CONTROL = 1; | 39 TAB_CONTROL = 1; |
| 39 NAVIGATION = 2; | 40 NAVIGATION = 2; |
| 40 RENDER_WIDGET = 3; | 41 RENDER_WIDGET = 3; |
| 41 INPUT = 4; | 42 INPUT = 4; |
| 42 COMPOSITOR = 5; | 43 COMPOSITOR = 5; |
| 43 PROTOCOL_CONTROL = 6; | 44 PROTOCOL_CONTROL = 6; |
| 45 IME = 7; | |
|
Wez
2016/03/18 20:51:28
What is the rationale for adding a top-level ImeMe
shaktisahu
2016/03/22 19:44:20
IME message is both way (client<-->server) whereas
Wez
2016/03/22 21:43:38
Let's stick w/ this for now & revisit naming if it
| |
| 44 } | 46 } |
| 45 | 47 |
| 46 // Sequence number of this message, used for message acknowledgement. | 48 // Sequence number of this message, used for message acknowledgement. |
| 47 // The sender may omit this value if it is exactly one higher than the | 49 // The sender may omit this value if it is exactly one higher than the |
| 48 // message that was previously sent. | 50 // message that was previously sent. |
| 49 optional int64 message_id = 1; | 51 optional int64 message_id = 1; |
| 50 | 52 |
| 51 // Identifies the feature type of this message. | 53 // Identifies the feature type of this message. |
| 52 // The feature-specific contents are contained in optional fields of the same | 54 // The feature-specific contents are contained in optional fields of the same |
| 53 // name (example: use |compositor| field for type=COMPOSITOR.) | 55 // name (example: use |compositor| field for type=COMPOSITOR.) |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 67 // Feature-specific messages follow. | 69 // Feature-specific messages follow. |
| 68 // Only one of these fields may be set per BlimpMessage. | 70 // Only one of these fields may be set per BlimpMessage. |
| 69 // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. See | 71 // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. See |
| 70 // crbug.com/570371. | 72 // crbug.com/570371. |
| 71 optional TabControlMessage tab_control = 1000; | 73 optional TabControlMessage tab_control = 1000; |
| 72 optional NavigationMessage navigation = 1001; | 74 optional NavigationMessage navigation = 1001; |
| 73 optional RenderWidgetMessage render_widget = 1002; | 75 optional RenderWidgetMessage render_widget = 1002; |
| 74 optional InputMessage input = 1003; | 76 optional InputMessage input = 1003; |
| 75 optional CompositorMessage compositor = 1004; | 77 optional CompositorMessage compositor = 1004; |
| 76 optional ProtocolControlMessage protocol_control = 1005; | 78 optional ProtocolControlMessage protocol_control = 1005; |
| 79 optional ImeMessage ime = 1006; | |
| 77 } | 80 } |
| 78 | 81 |
| OLD | NEW |