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 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 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 CONTROL = 1; | 37 CONTROL = 1; |
| 38 NAVIGATION = 2; | 38 NAVIGATION = 2; |
| 39 RENDER_WIDGET = 3; | 39 RENDER_WIDGET = 3; |
| 40 INPUT = 4; | 40 INPUT = 4; |
| 41 COMPOSITOR = 5; | 41 COMPOSITOR = 5; |
| 42 START_CONNECTION = 6; | |
| 42 } | 43 } |
| 43 // Identifies the feature type of this message. | 44 // Identifies the feature type of this message. |
| 44 // The feature-specific contents are contained in optional fields of the same | 45 // The feature-specific contents are contained in optional fields of the same |
| 45 // name (example: use |compositor| field for type=COMPOSITOR.) | 46 // name (example: use |compositor| field for type=COMPOSITOR.) |
| 46 optional Type type = 1; | 47 optional Type type = 1; |
| 47 | 48 |
| 48 // Uniquely identifies the Blimp session that originated this message. | 49 // Uniquely identifies the Blimp session that originated this message. |
| 49 // Session IDs are invalidated whenever new sessions are created. | 50 // Session IDs are invalidated whenever new sessions are created. |
| 50 // If a message's |session_id| does not match the client's session ID, | 51 // If a message's |session_id| does not match the client's session ID, |
| 51 // then the message may have originated from a discarded session and can be | 52 // then the message may have originated from a discarded session and can be |
| 52 // safely ignored. | 53 // safely ignored. |
| 53 optional int32 session_id = 2; | 54 optional int32 session_id = 2; |
| 54 | 55 |
| 55 // ID of the tab that is referenced by this message. | 56 // ID of the tab that is referenced by this message. |
| 56 // Messages that are tab-agnostic may leave this field unset. | 57 // Messages that are tab-agnostic may leave this field unset. |
| 57 optional int32 target_tab_id = 3; | 58 optional int32 target_tab_id = 3; |
| 58 | 59 |
| 59 // Feature-specific messages follow. | 60 // Feature-specific messages follow. |
| 60 // Only one of these fields may be set per BlimpMessage. | 61 // Only one of these fields may be set per BlimpMessage. |
| 61 // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. | 62 // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. |
| 62 optional ControlMessage control = 1000; | 63 optional ControlMessage control = 1000; |
| 63 optional NavigationMessage navigation = 1001; | 64 optional NavigationMessage navigation = 1001; |
| 64 optional RenderWidgetMessage render_widget = 1002; | 65 optional RenderWidgetMessage render_widget = 1002; |
| 65 optional InputMessage input = 1003; | 66 optional InputMessage input = 1003; |
| 66 optional CompositorMessage compositor = 1004; | 67 optional CompositorMessage compositor = 1004; |
| 68 optional StartConnectionMessage start_connection = 1005; | |
|
Wez
2015/12/02 01:52:52
Let's either move these into a general "protocol c
haibinlu
2015/12/03 01:53:15
Done.
| |
| 67 } | 69 } |
| 68 | 70 |
| OLD | NEW |