| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 // | |
| 5 // Contains the BlimpMessage proto which frames all messages sent over Blimp | |
| 6 // subchannels. BlimpMessage protos are serialized and transmitted over the | |
| 7 // wire to the Blimplet server. | |
| 8 // | |
| 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 | |
| 11 // feature-specific field (see field IDs 1000 and onward). | |
| 12 // The |type| field tells the receiving end how the BlimpMessage should | |
| 13 // be unpacked and which component it should be routed to. | |
| 14 // | |
| 15 // CONVENTIONS: | |
| 16 // * A BlimpMessage can contain only one feature message. | |
| 17 // * Feature message protos are placed in their own files. | |
| 18 // * Features are applied to unidirectional channels. Client->server and | |
| 19 // server->client channels for a component should be broken out as distinct | |
| 20 // features, even if they are conceptually similar. | |
| 21 | |
| 22 syntax = "proto2"; | |
| 23 | |
| 24 option optimize_for = LITE_RUNTIME; | |
| 25 | |
| 26 import "blob_channel.proto"; | |
| 27 import "compositor.proto"; | |
| 28 import "ime.proto"; | |
| 29 import "input.proto"; | |
| 30 import "geolocation.proto"; | |
| 31 import "navigation.proto"; | |
| 32 import "render_widget.proto"; | |
| 33 import "protocol_control.proto"; | |
| 34 import "settings.proto"; | |
| 35 import "tab_control.proto"; | |
| 36 | |
| 37 package blimp; | |
| 38 | |
| 39 message BlimpMessage { | |
| 40 // Sequence number of this message, used for message acknowledgement. | |
| 41 // The sender may omit this value if it is exactly one higher than the | |
| 42 // message that was previously sent. | |
| 43 optional int64 message_id = 1; | |
| 44 | |
| 45 // Uniquely identifies the Blimp session that originated this message. | |
| 46 // Session IDs are invalidated whenever new sessions are created. | |
| 47 // If a message's |session_id| does not match the client's session ID, | |
| 48 // then the message may have originated from a discarded session and can be | |
| 49 // safely ignored. | |
| 50 optional int32 session_id = 3; | |
| 51 | |
| 52 // ID of the tab that is referenced by this message. | |
| 53 // Messages that are tab-agnostic may leave this field unset. | |
| 54 optional int32 target_tab_id = 4; | |
| 55 | |
| 56 // Feature-specific messages follow. | |
| 57 oneof feature { | |
| 58 TabControlMessage tab_control = 40; | |
| 59 NavigationMessage navigation = 41; | |
| 60 RenderWidgetMessage render_widget = 42; | |
| 61 InputMessage input = 43; | |
| 62 CompositorMessage compositor = 44; | |
| 63 ProtocolControlMessage protocol_control = 45; | |
| 64 ImeMessage ime = 46; | |
| 65 SettingsMessage settings = 47; | |
| 66 BlobChannelMessage blob_channel = 48; | |
| 67 GeolocationMessage geolocation = 49; | |
| 68 } | |
| 69 } | |
| 70 | |
| OLD | NEW |