OLD | NEW |
(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 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTOCOL_H_ |
| 6 #define REMOTING_CLIENT_PLUGIN_CHROMOTOCOL_H_ |
| 7 |
| 8 #include "base/scoped_ptr.h" |
| 9 |
| 10 namespace remoting { |
| 11 |
| 12 class HostConnection; |
| 13 |
| 14 enum ControlMessage { |
| 15 MessageInit, |
| 16 MessageUpdate, |
| 17 MessageMouse, |
| 18 }; |
| 19 |
| 20 struct InitMessage { |
| 21 int message; |
| 22 int compression; |
| 23 int width; |
| 24 int height; |
| 25 }; |
| 26 |
| 27 struct MouseMessage { |
| 28 int message; |
| 29 int x, y; |
| 30 int flags; |
| 31 }; |
| 32 |
| 33 enum MouseFlag { |
| 34 LeftDown = 1 << 1, |
| 35 LeftUp = 1 << 2, |
| 36 RightDown = 1 << 3, |
| 37 RightUp = 1 << 4 |
| 38 }; |
| 39 |
| 40 struct UpdateMessage { |
| 41 int message; |
| 42 int num_diffs; |
| 43 int compression; |
| 44 int compressed_size; |
| 45 }; |
| 46 |
| 47 enum ImageFormat { |
| 48 FormatRaw, |
| 49 FormatJpeg, // Not used |
| 50 FormatPng, // Not used |
| 51 FormatZlib, // Not used |
| 52 FormatVp8, |
| 53 }; |
| 54 |
| 55 enum Compression { |
| 56 CompressionNone, |
| 57 CompressionZlib, |
| 58 }; |
| 59 |
| 60 struct BinaryImageHeader { |
| 61 BinaryImageHeader() |
| 62 : format(FormatRaw), x(0), y(0), width(0), height(0), size(0) {} |
| 63 |
| 64 ImageFormat format; |
| 65 int x; |
| 66 int y; |
| 67 int width; |
| 68 int height; |
| 69 int size; |
| 70 }; |
| 71 |
| 72 struct BinaryImage { |
| 73 BinaryImageHeader header; |
| 74 scoped_ptr<char> data; |
| 75 }; |
| 76 |
| 77 } // namespace remoting |
| 78 |
| 79 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTOCOL_H_ |
OLD | NEW |