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 // Message definitions for browser tab control messages. | 5 // Message definitions for browser tab control messages. |
6 | 6 |
7 syntax = "proto2"; | 7 syntax = "proto2"; |
8 | 8 |
9 option optimize_for = LITE_RUNTIME; | 9 option optimize_for = LITE_RUNTIME; |
10 | 10 |
11 package blimp; | 11 package blimp; |
12 | 12 |
13 // Contains display information that represents resize events coming from the | 13 // Contains display information that represents resize events coming from the |
14 // client device. | 14 // client device. |
15 message SizeMessage { | 15 message SizeMessage { |
16 optional uint64 width = 1; | 16 optional uint64 width = 1; |
17 optional uint64 height = 2; | 17 optional uint64 height = 2; |
18 optional float device_pixel_ratio = 3; | 18 optional float device_pixel_ratio = 3; |
19 } | 19 } |
20 | 20 |
| 21 message EmptyMessage {} |
| 22 |
21 message TabControlMessage { | 23 message TabControlMessage { |
22 enum Type { | 24 // Feature-specific messages follow. |
23 UNKNOWN = 0; | 25 oneof tab_control { |
24 | |
25 // Client <=> Server types. | 26 // Client <=> Server types. |
26 CREATE_TAB = 1; | 27 EmptyMessage create_tab = 40; |
27 CLOSE_TAB = 2; | 28 EmptyMessage close_tab = 41; |
28 | 29 |
29 // Client => Server types. | 30 // Client => Server types. |
30 SIZE = 3; | 31 SizeMessage size = 42; |
31 } | 32 } |
32 | |
33 optional Type type = 1; | |
34 | |
35 // Feature-specific messages follow. | |
36 // Only one of these fields may be set per TabControlMessage. | |
37 // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. See | |
38 // crbug.com/570371. | |
39 optional SizeMessage size = 1000; | |
40 } | 33 } |
OLD | NEW |