summaryrefslogtreecommitdiffstats
path: root/remoting/base
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 21:56:39 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 21:56:39 +0000
commitef0a59a6fd722a0910196c951dc676c19127a28b (patch)
tree9d90ab9227e4222fa312dadae114c8d2247028bf /remoting/base
parente9fdd159ffd94e3e097bd6905d84e6b564b04c2c (diff)
downloadchromium_src-ef0a59a6fd722a0910196c951dc676c19127a28b.zip
chromium_src-ef0a59a6fd722a0910196c951dc676c19127a28b.tar.gz
chromium_src-ef0a59a6fd722a0910196c951dc676c19127a28b.tar.bz2
Implement a chromoting client using X11
Using XRender to render the chromoting client. This patch has done several things: 1. Rename chromotocol_pb to remoting 2. Defined ChromotingView as the display area of the remote view 3. Implemented X11Client as the client that uses X11 for display 4. Implemented X11View that uses XRender for drawing 5. Fixed several problems in host capturer and encoder Review URL: http://codereview.chromium.org/2745006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/base')
-rw-r--r--remoting/base/protocol/chromotocol.proto2
-rw-r--r--remoting/base/protocol_decoder.cc4
-rw-r--r--remoting/base/protocol_decoder.h4
-rw-r--r--remoting/base/protocol_decoder_unittest.cc4
4 files changed, 7 insertions, 7 deletions
diff --git a/remoting/base/protocol/chromotocol.proto b/remoting/base/protocol/chromotocol.proto
index a7907f9..e60716f 100644
--- a/remoting/base/protocol/chromotocol.proto
+++ b/remoting/base/protocol/chromotocol.proto
@@ -8,7 +8,7 @@ syntax = "proto2";
option optimize_for = LITE_RUNTIME;
-package chromotocol_pb;
+package remoting;
// A message that gets sent to the client after the client is connected to the
// host. It contains information that the client needs to know about the host.
diff --git a/remoting/base/protocol_decoder.cc b/remoting/base/protocol_decoder.cc
index 1334b20..3b60f2b 100644
--- a/remoting/base/protocol_decoder.cc
+++ b/remoting/base/protocol_decoder.cc
@@ -18,12 +18,12 @@ ProtocolDecoder::ProtocolDecoder()
void ProtocolDecoder::ParseClientMessages(scoped_refptr<media::DataBuffer> data,
ClientMessageList* messages) {
- ParseMessages<chromotocol_pb::ClientMessage>(data, messages);
+ ParseMessages<ClientMessage>(data, messages);
}
void ProtocolDecoder::ParseHostMessages(scoped_refptr<media::DataBuffer> data,
HostMessageList* messages) {
- ParseMessages<chromotocol_pb::HostMessage>(data, messages);
+ ParseMessages<HostMessage>(data, messages);
}
template <typename T>
diff --git a/remoting/base/protocol_decoder.h b/remoting/base/protocol_decoder.h
index 9350e51..c817723 100644
--- a/remoting/base/protocol_decoder.h
+++ b/remoting/base/protocol_decoder.h
@@ -15,8 +15,8 @@
namespace remoting {
-typedef std::vector<chromotocol_pb::HostMessage*> HostMessageList;
-typedef std::vector<chromotocol_pb::ClientMessage*> ClientMessageList;
+typedef std::vector<HostMessage*> HostMessageList;
+typedef std::vector<ClientMessage*> ClientMessageList;
// A protocol decoder is used to decode data transmitted in the chromoting
// network.
diff --git a/remoting/base/protocol_decoder_unittest.cc b/remoting/base/protocol_decoder_unittest.cc
index 900f7eb..d1bd584 100644
--- a/remoting/base/protocol_decoder_unittest.cc
+++ b/remoting/base/protocol_decoder_unittest.cc
@@ -16,7 +16,7 @@ static const int kWidth = 640;
static const int kHeight = 480;
static const std::string kTestData = "Chromoting rockz";
-static void AppendMessage(const chromotocol_pb::HostMessage& msg,
+static void AppendMessage(const HostMessage& msg,
std::string* buffer) {
// Contains one encoded message.
scoped_refptr<media::DataBuffer> encoded_msg;
@@ -31,7 +31,7 @@ static void PrepareData(uint8** buffer, int* size) {
std::string encoded_data;
// The first message is InitClient.
- chromotocol_pb::HostMessage msg;
+ HostMessage msg;
msg.mutable_init_client()->set_width(kWidth);
msg.mutable_init_client()->set_height(kHeight);
AppendMessage(msg, &encoded_data);