Chromium Code Reviews| Index: blimp/common/proto/blimp_message.proto |
| diff --git a/blimp/common/proto/blimp_message.proto b/blimp/common/proto/blimp_message.proto |
| index 5a8ad614d2d23cc9b20a8dde763a2cedb3f4d251..18ee9f0ba9269abd67773793bf4791ca832a103f 100644 |
| --- a/blimp/common/proto/blimp_message.proto |
| +++ b/blimp/common/proto/blimp_message.proto |
| @@ -35,28 +35,11 @@ import "tab_control.proto"; |
| package blimp; |
| message BlimpMessage { |
| - enum Type { |
| - UNKNOWN = 0; |
| - TAB_CONTROL = 1; |
| - NAVIGATION = 2; |
| - RENDER_WIDGET = 3; |
| - INPUT = 4; |
| - COMPOSITOR = 5; |
| - PROTOCOL_CONTROL = 6; |
| - IME = 7; |
| - SETTINGS = 8; |
| - } |
| - |
| // Sequence number of this message, used for message acknowledgement. |
| // The sender may omit this value if it is exactly one higher than the |
| // message that was previously sent. |
| optional int64 message_id = 1; |
| - // Identifies the feature type of this message. |
| - // The feature-specific contents are contained in optional fields of the same |
| - // name (example: use |compositor| field for type=COMPOSITOR.) |
| - optional Type type = 2; |
| - |
| // Uniquely identifies the Blimp session that originated this message. |
| // Session IDs are invalidated whenever new sessions are created. |
| // If a message's |session_id| does not match the client's session ID, |
| @@ -69,16 +52,15 @@ message BlimpMessage { |
| optional int32 target_tab_id = 4; |
| // Feature-specific messages follow. |
| - // Only one of these fields may be set per BlimpMessage. |
| - // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. See |
| - // crbug.com/570371. |
| - optional TabControlMessage tab_control = 1000; |
| - optional NavigationMessage navigation = 1001; |
| - optional RenderWidgetMessage render_widget = 1002; |
| - optional InputMessage input = 1003; |
| - optional CompositorMessage compositor = 1004; |
| - optional ProtocolControlMessage protocol_control = 1005; |
| - optional ImeMessage ime = 1006; |
| - optional SettingsMessage settings = 1007; |
| + oneof feature { |
| + TabControlMessage tab_control = 1000; |
|
Wez
2016/05/18 01:53:31
nit: While we're here, we may as well reduce these
shaktisahu
2016/05/18 03:55:42
Done.
|
| + NavigationMessage navigation = 1001; |
| + RenderWidgetMessage render_widget = 1002; |
| + InputMessage input = 1003; |
| + CompositorMessage compositor = 1004; |
| + ProtocolControlMessage protocol_control = 1005; |
| + ImeMessage ime = 1006; |
| + SettingsMessage settings = 1007; |
| + } |
| } |