Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: remoting/base/protocol/chromotocol.proto

Issue 2690003: Copy the (early prototype of) remoting in Chrome into the public tree.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/base/protocol/chromotocol.gyp ('k') | remoting/base/protocol_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 // Protocol for communication between chromoting client and host.
6
7 syntax = "proto2";
8
9 option optimize_for = LITE_RUNTIME;
10
11 package chromotocol_pb;
12
13 // A message that gets sent to the client after the client is connected to the
14 // host. It contains information that the client needs to know about the host.
15 // NEXT ID: 3
16 message InitClientMessage {
17 required int32 width = 1;
18 required int32 height = 2;
19 }
20
21 // A message to denote the beginning of an update stream. It will be followed
22 // by 0 or more PartialUpdateStream messages and then a EndUpdateStream message.
23 // NEXT ID: 1
24 message BeginUpdateStreamMessage {
25 }
26
27 // A message to denote the end of an update stream.
28 // NEXT ID: 1
29 message EndUpdateStreamMessage {
30 }
31
32 // Identifies how the image was encoded.
33 enum UpdateStreamEncoding {
34 EncodingNone = 0;
35 EncodingZlib = 1;
36 }
37
38 // Identifies the pixel format.
39 // Note that this list should match exactly the same as
40 // media::VideoFrame::Format in media/base/video_frame.h.
41 enum PixelFormat {
42 PixelFormatInvalid = 0;
43 PixelFormatRgb555 = 1;
44 PixelFormatRgb565 = 2;
45 PixelFormatRgb24 = 3;
46 PixelFormatRgb32 = 4;
47 PixelFormatRgba = 5;
48 PixelFormatYv12 = 6;
49 PixelFormatYv16 = 7;
50 PixelFormatEmpty = 8;
51 PixelFormatAscii = 9;
52 }
53
54 // A message with info about the update stream.
55 // NEXT ID: 6
56 message UpdateStreamPacketHeader {
57 // X,Y coordinates (in screen pixels) for origin of this update.
58 required int32 x = 1;
59 required int32 y = 2;
60
61 // Width, height (in screen pixels) for this update.
62 required int32 width = 3;
63 required int32 height = 4;
64
65 // The encoding used for this image update.
66 optional UpdateStreamEncoding encoding = 5 [default=EncodingNone];
67
68 // The pixel format of this image.
69 optional PixelFormat pixel_format = 6 [default=PixelFormatRgb24];
70 }
71
72 // A message to denote a partial update stream.
73 // NEXT ID: 3
74 message UpdateStreamPacketMessage {
75 // TODO(garykac): Make this required and fix unit tests.
76 optional UpdateStreamPacketHeader header = 2;
77 optional bytes data = 1;
78 }
79
80 // Defines the message that is sent from the host to the client.
81 // Only one of these messages should be present.
82 // NEXT ID: 5
83 message HostMessage {
84 optional InitClientMessage init_client= 1;
85 optional BeginUpdateStreamMessage begin_update_stream = 2;
86 optional EndUpdateStreamMessage end_update_stream = 3;
87 optional UpdateStreamPacketMessage update_stream_packet = 4;
88 }
89
90 // Defines a keyboard event.
91 // NEXT ID: 3
92 message KeyEvent {
93 // The POSIX key code.
94 required int32 key = 1;
95 required bool pressed = 2;
96 }
97
98 // Sets the position of the mouse cursor.
99 // The coordinate value is between [0 .. 1] which is relative to the
100 // dimension of the screen area.
101 // NEXT ID: 3
102 message MouseSetPositionEvent {
103 required float x = 1;
104 required float y = 2;
105 }
106
107 // Adjust the position of the mouse cursor by an offset.
108 // NEXT ID: 3
109 message MouseMoveEvent {
110 required int32 offset_x = 1;
111 required int32 offset_y = 2;
112 }
113
114 // Motion of the mouse wheel.
115 // NEXT ID: 3
116 message MouseWheelEvent {
117 required int32 offset_x = 1;
118 required int32 offset_y = 2;
119 }
120
121 // Mouse button is pressed down.
122 // NEXT ID: 2
123 message MouseDownEvent {
124 enum Button {
125 LEFT = 0;
126 MIDDLE = 1;
127 RIGHT = 2;
128 }
129 required Button button = 1;
130 }
131
132 // Mouse button is released.
133 // NEXT ID: 2
134 message MouseUpEvent {
135 enum Button {
136 LEFT = 0;
137 MIDDLE = 1;
138 RIGHT = 2;
139 }
140 required Button button = 1;
141 }
142
143 // Defines the message that is sent from the client to the host.
144 // Only one of these messages should be present.
145 // NEXT ID: 7
146 message ClientMessage {
147 optional KeyEvent key_event = 1;
148 optional MouseSetPositionEvent mouse_set_position_event = 2;
149 optional MouseMoveEvent mouse_move_event = 3;
150 optional MouseWheelEvent mouse_wheel_event = 4;
151 optional MouseDownEvent mouse_down_event = 5;
152 optional MouseUpEvent mouse_up_event = 6;
153 }
OLDNEW
« no previous file with comments | « remoting/base/protocol/chromotocol.gyp ('k') | remoting/base/protocol_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698