summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorgarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-23 22:00:20 +0000
committergarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-23 22:00:20 +0000
commit81824d23b48295a2f07ac6417a15f815e4f038a2 (patch)
treee56de95590ab9828fff5d5ea9c79281c8d262134 /remoting
parente012492b4d13f638f0bfdd9524367078e34001ec (diff)
downloadchromium_src-81824d23b48295a2f07ac6417a15f815e4f038a2.zip
chromium_src-81824d23b48295a2f07ac6417a15f815e4f038a2.tar.gz
chromium_src-81824d23b48295a2f07ac6417a15f815e4f038a2.tar.bz2
Rename (Host|Client)Message to Chromoting(Host|Client)Message.
Rename HostMessage and ClientMessage to Chromoting{Host|Client}Message to avoid conflicts with messages in X11. Actually, only ClientMessage needs to be changed due to conflict, but HostMessage is changed to keep the names consistent. BUG=none TEST=remoting unittests Review URL: http://codereview.chromium.org/3161034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/base/codec_test.cc10
-rw-r--r--remoting/base/decoder.h10
-rw-r--r--remoting/base/decoder_verbatim.cc10
-rw-r--r--remoting/base/decoder_verbatim.h8
-rw-r--r--remoting/base/decoder_verbatim_unittest.cc2
-rw-r--r--remoting/base/decoder_zlib.cc10
-rw-r--r--remoting/base/decoder_zlib.h8
-rw-r--r--remoting/base/encoder.h5
-rw-r--r--remoting/base/encoder_verbatim.cc2
-rw-r--r--remoting/base/encoder_zlib.cc9
-rw-r--r--remoting/base/encoder_zlib.h8
-rw-r--r--remoting/base/protocol/chromotocol.proto4
-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
-rw-r--r--remoting/client/chromoting_client.cc12
-rw-r--r--remoting/client/chromoting_client.h8
-rw-r--r--remoting/client/chromoting_view.h8
-rw-r--r--remoting/client/plugin/pepper_view.cc10
-rw-r--r--remoting/client/plugin/pepper_view.h6
-rw-r--r--remoting/client/x11_input_handler.cc4
-rw-r--r--remoting/client/x11_view.cc10
-rw-r--r--remoting/client/x11_view.h6
-rw-r--r--remoting/host/client_connection.cc10
-rw-r--r--remoting/host/client_connection.h14
-rw-r--r--remoting/host/session_manager.cc4
-rw-r--r--remoting/host/session_manager.h4
-rw-r--r--remoting/host/session_manager_unittest.cc2
28 files changed, 99 insertions, 97 deletions
diff --git a/remoting/base/codec_test.cc b/remoting/base/codec_test.cc
index fd4469c..40c42ed 100644
--- a/remoting/base/codec_test.cc
+++ b/remoting/base/codec_test.cc
@@ -85,7 +85,7 @@ class EncoderMessageTester {
}
// Test that we received the correct message.
- void ReceivedMessage(HostMessage* message) {
+ void ReceivedMessage(ChromotingHostMessage* message) {
EXPECT_TRUE(message->has_update_stream_packet());
if (state_ == kWaitingForBeginRect) {
@@ -162,7 +162,7 @@ class DecoderTester {
EXPECT_TRUE(frame_.get());
}
- void ReceivedMessage(HostMessage* message) {
+ void ReceivedMessage(ChromotingHostMessage* message) {
if (message->has_update_stream_packet()) {
decoder_->PartialDecode(message);
return;
@@ -265,7 +265,7 @@ class EncoderTester {
EXPECT_GT(data_available_, 0);
}
- void DataAvailable(HostMessage* message,
+ void DataAvailable(ChromotingHostMessage* message,
Encoder::EncodingState state) {
++data_available_;
message_tester_->ReceivedMessage(message);
@@ -274,7 +274,7 @@ class EncoderTester {
// Send the message to the DecoderTester.
if (decoder_tester_) {
if (state & Encoder::EncodingStarting) {
- HostMessage* begin_update = new HostMessage();
+ ChromotingHostMessage* begin_update = new ChromotingHostMessage();
begin_update->mutable_begin_update_stream();
decoder_tester_->ReceivedMessage(begin_update);
}
@@ -284,7 +284,7 @@ class EncoderTester {
}
if (state & Encoder::EncodingEnded) {
- HostMessage* end_update = new HostMessage();
+ ChromotingHostMessage* end_update = new ChromotingHostMessage();
end_update->mutable_end_update_stream();
decoder_tester_->ReceivedMessage(end_update);
}
diff --git a/remoting/base/decoder.h b/remoting/base/decoder.h
index 1df477d..9795761 100644
--- a/remoting/base/decoder.h
+++ b/remoting/base/decoder.h
@@ -24,7 +24,7 @@ typedef std::vector<gfx::Rect> UpdatedRects;
// Sequence of actions with a decoder is as follows:
//
// 1. BeginDecode(PartialDecodeDone, DecodeDone, VideoFrame)
-// 2. PartialDecode(HostMessage)
+// 2. PartialDecode(ChromotingHostMessage)
// ...
// 3. EndDecode()
//
@@ -54,15 +54,15 @@ class Decoder {
Task* partial_decode_done,
Task* decode_done) = 0;
- // Give a HostMessage that contains the update stream packet that contains
- // the encoded data to the decoder.
+ // Give a ChromotingHostMessage that contains the update stream packet that
+ // contains the encoded data to the decoder.
// The decoder will own |message| and is responsible for deleting it.
//
// If the decoder has written something into |frame|,
// |partial_decode_done_| is called with |frame| and updated regions.
// Return true if the decoder can accept |message| and decode it.
//
- // HostMessage returned by this method will contain a
+ // ChromotingHostMessage returned by this method will contain a
// UpdateStreamPacketMessage.
// This message will contain either:
// 1. UpdateStreamBeginRect
@@ -71,7 +71,7 @@ class Decoder {
//
// See remoting/base/protocol/chromotocol.proto for more information about
// these messages.
- virtual bool PartialDecode(HostMessage* message) = 0;
+ virtual bool PartialDecode(ChromotingHostMessage* message) = 0;
// Notify the decoder that we have received the last update stream packet.
// If the decoding of the update stream has completed |decode_done_| is
diff --git a/remoting/base/decoder_verbatim.cc b/remoting/base/decoder_verbatim.cc
index e17310d..3af6032 100644
--- a/remoting/base/decoder_verbatim.cc
+++ b/remoting/base/decoder_verbatim.cc
@@ -38,8 +38,8 @@ bool DecoderVerbatim::BeginDecode(scoped_refptr<media::VideoFrame> frame,
return true;
}
-bool DecoderVerbatim::PartialDecode(HostMessage* message) {
- scoped_ptr<HostMessage> msg_deleter(message);
+bool DecoderVerbatim::PartialDecode(ChromotingHostMessage* message) {
+ scoped_ptr<ChromotingHostMessage> msg_deleter(message);
DCHECK(message->has_update_stream_packet());
bool ret = true;
@@ -62,7 +62,7 @@ void DecoderVerbatim::EndDecode() {
updated_rects_ = NULL;
}
-bool DecoderVerbatim::HandleBeginRect(HostMessage* message) {
+bool DecoderVerbatim::HandleBeginRect(ChromotingHostMessage* message) {
DCHECK_EQ(kWaitingForBeginRect, state_);
state_ = kWaitingForRectData;
@@ -86,7 +86,7 @@ bool DecoderVerbatim::HandleBeginRect(HostMessage* message) {
return true;
}
-bool DecoderVerbatim::HandleRectData(HostMessage* message) {
+bool DecoderVerbatim::HandleRectData(ChromotingHostMessage* message) {
DCHECK_EQ(kWaitingForRectData, state_);
DCHECK_EQ(0,
message->update_stream_packet().rect_data().sequence_number());
@@ -118,7 +118,7 @@ bool DecoderVerbatim::HandleRectData(HostMessage* message) {
return true;
}
-bool DecoderVerbatim::HandleEndRect(HostMessage* message) {
+bool DecoderVerbatim::HandleEndRect(ChromotingHostMessage* message) {
DCHECK_EQ(kWaitingForRectData, state_);
state_ = kWaitingForBeginRect;
return true;
diff --git a/remoting/base/decoder_verbatim.h b/remoting/base/decoder_verbatim.h
index 22543f9..67b6cfa 100644
--- a/remoting/base/decoder_verbatim.h
+++ b/remoting/base/decoder_verbatim.h
@@ -18,15 +18,15 @@ class DecoderVerbatim : public Decoder {
UpdatedRects* update_rects,
Task* partial_decode_done,
Task* decode_done);
- virtual bool PartialDecode(HostMessage* message);
+ virtual bool PartialDecode(ChromotingHostMessage* message);
virtual void EndDecode();
void set_reverse_rows(bool reverse) { reverse_rows_ = reverse; }
private:
- bool HandleBeginRect(HostMessage* message);
- bool HandleRectData(HostMessage* message);
- bool HandleEndRect(HostMessage* message);
+ bool HandleBeginRect(ChromotingHostMessage* message);
+ bool HandleRectData(ChromotingHostMessage* message);
+ bool HandleEndRect(ChromotingHostMessage* message);
// The internal state of the decoder.
State state_;
diff --git a/remoting/base/decoder_verbatim_unittest.cc b/remoting/base/decoder_verbatim_unittest.cc
index 947750a..8c00d76 100644
--- a/remoting/base/decoder_verbatim_unittest.cc
+++ b/remoting/base/decoder_verbatim_unittest.cc
@@ -21,7 +21,7 @@ TEST(DecoderVerbatimTest, SimpleDecode) {
const size_t kWidth = 10;
const size_t kHeight = 1;
const char kData[] = "ABCDEFGHIJ";
- scoped_ptr<HostMessage> msg(new HostMessage());
+ scoped_ptr<ChromotingHostMessage> msg(new ChromotingHostMessage());
// Prepare the begin rect message.
UpdateStreamBeginRect* begin_rect =
diff --git a/remoting/base/decoder_zlib.cc b/remoting/base/decoder_zlib.cc
index e44a2f2..b2b782a 100644
--- a/remoting/base/decoder_zlib.cc
+++ b/remoting/base/decoder_zlib.cc
@@ -49,8 +49,8 @@ bool DecoderZlib::BeginDecode(scoped_refptr<media::VideoFrame> frame,
return true;
}
-bool DecoderZlib::PartialDecode(HostMessage* message) {
- scoped_ptr<HostMessage> msg_deleter(message);
+bool DecoderZlib::PartialDecode(ChromotingHostMessage* message) {
+ scoped_ptr<ChromotingHostMessage> msg_deleter(message);
DCHECK(message->has_update_stream_packet());
bool ret = true;
@@ -74,7 +74,7 @@ void DecoderZlib::EndDecode() {
decompressor_.reset();
}
-bool DecoderZlib::HandleBeginRect(HostMessage* message) {
+bool DecoderZlib::HandleBeginRect(ChromotingHostMessage* message) {
DCHECK_EQ(kWaitingForBeginRect, state_);
state_ = kWaitingForRectData;
@@ -100,7 +100,7 @@ bool DecoderZlib::HandleBeginRect(HostMessage* message) {
return true;
}
-bool DecoderZlib::HandleRectData(HostMessage* message) {
+bool DecoderZlib::HandleRectData(ChromotingHostMessage* message) {
DCHECK_EQ(kWaitingForRectData, state_);
DCHECK_EQ(0,
message->update_stream_packet().rect_data().sequence_number());
@@ -145,7 +145,7 @@ bool DecoderZlib::HandleRectData(HostMessage* message) {
return true;
}
-bool DecoderZlib::HandleEndRect(HostMessage* message) {
+bool DecoderZlib::HandleEndRect(ChromotingHostMessage* message) {
DCHECK_EQ(kWaitingForRectData, state_);
state_ = kWaitingForBeginRect;
diff --git a/remoting/base/decoder_zlib.h b/remoting/base/decoder_zlib.h
index 05f8a99..ee897ab 100644
--- a/remoting/base/decoder_zlib.h
+++ b/remoting/base/decoder_zlib.h
@@ -20,16 +20,16 @@ class DecoderZlib : public Decoder {
UpdatedRects* update_rects,
Task* partial_decode_done,
Task* decode_done);
- virtual bool PartialDecode(HostMessage* message);
+ virtual bool PartialDecode(ChromotingHostMessage* message);
virtual void EndDecode();
// TODO(hclam): Should make this into the Decoder interface.
void set_reverse_rows(bool reverse) { reverse_rows_ = reverse; }
private:
- bool HandleBeginRect(HostMessage* message);
- bool HandleRectData(HostMessage* message);
- bool HandleEndRect(HostMessage* message);
+ bool HandleBeginRect(ChromotingHostMessage* message);
+ bool HandleRectData(ChromotingHostMessage* message);
+ bool HandleEndRect(ChromotingHostMessage* message);
// The internal state of the decoder.
State state_;
diff --git a/remoting/base/encoder.h b/remoting/base/encoder.h
index 0c1fd50f..3704f3f 100644
--- a/remoting/base/encoder.h
+++ b/remoting/base/encoder.h
@@ -17,7 +17,7 @@ namespace media {
namespace remoting {
class CaptureData;
-class HostMessage;
+class ChromotingHostMessage;
// A class to perform the task of encoding a continous stream of
// images.
@@ -40,7 +40,8 @@ class Encoder {
// of HostMessage to reduce the amount of memory copies.
// The callback takes ownership of the HostMessage and is responsible for
// deleting it.
- typedef Callback2<HostMessage*, EncodingState>::Type DataAvailableCallback;
+ typedef Callback2<ChromotingHostMessage*,
+ EncodingState>::Type DataAvailableCallback;
virtual ~Encoder() {}
diff --git a/remoting/base/encoder_verbatim.cc b/remoting/base/encoder_verbatim.cc
index 6a5a7d6..d3821d7 100644
--- a/remoting/base/encoder_verbatim.cc
+++ b/remoting/base/encoder_verbatim.cc
@@ -23,7 +23,7 @@ void EncoderVerbatim::Encode(scoped_refptr<CaptureData> capture_data,
for (InvalidRects::const_iterator r = rects.begin();
r != rects.end(); ++r, ++index) {
const gfx::Rect& dirty_rect = *r;
- HostMessage* msg = new HostMessage();
+ ChromotingHostMessage* msg = new ChromotingHostMessage();
UpdateStreamPacketMessage* packet = msg->mutable_update_stream_packet();
if (EncodeRect(dirty_rect.x(), dirty_rect.y(), dirty_rect.width(),
diff --git a/remoting/base/encoder_zlib.cc b/remoting/base/encoder_zlib.cc
index 84842ac..fdf8725 100644
--- a/remoting/base/encoder_zlib.cc
+++ b/remoting/base/encoder_zlib.cc
@@ -48,7 +48,7 @@ void EncoderZlib::EncodeRect(CompressorZlib* compressor,
const int bytes_per_pixel = GetBytesPerPixel(capture_data_->pixel_format());
const int row_size = bytes_per_pixel * rect.width();
- HostMessage* message = PrepareMessage(&rect);
+ ChromotingHostMessage* message = PrepareMessage(&rect);
const uint8 * in = capture_data_->data_planes().data[0] +
rect.y() * strides +
rect.x() * bytes_per_pixel;
@@ -107,8 +107,8 @@ void EncoderZlib::EncodeRect(CompressorZlib* compressor,
}
}
-HostMessage* EncoderZlib::PrepareMessage(const gfx::Rect* rect) {
- HostMessage* message = new HostMessage();
+ChromotingHostMessage* EncoderZlib::PrepareMessage(const gfx::Rect* rect) {
+ ChromotingHostMessage* message = new ChromotingHostMessage();
UpdateStreamPacketMessage* packet = message->mutable_update_stream_packet();
// Prepare the begin rect content.
@@ -126,7 +126,8 @@ HostMessage* EncoderZlib::PrepareMessage(const gfx::Rect* rect) {
return message;
}
-void EncoderZlib::SubmitMessage(HostMessage* message, size_t rect_index) {
+void EncoderZlib::SubmitMessage(ChromotingHostMessage* message,
+ size_t rect_index) {
EncodingState state = EncodingInProgress;
if (rect_index == 0 && message->update_stream_packet().has_begin_rect())
state |= EncodingStarting;
diff --git a/remoting/base/encoder_zlib.h b/remoting/base/encoder_zlib.h
index 476135b..0c88e7e 100644
--- a/remoting/base/encoder_zlib.h
+++ b/remoting/base/encoder_zlib.h
@@ -31,12 +31,12 @@ class EncoderZlib : public Encoder {
void EncodeRect(CompressorZlib* compressor, const gfx::Rect& rect,
size_t rect_index);
- // Create a new HostMessage with the right flag and attributes. The message
- // can be used immediately for output of encoding.
- HostMessage* PrepareMessage(const gfx::Rect* rect);
+ // Create a new ChromotingHostMessage with the right flag and attributes.
+ // The message can be used immediately for output of encoding.
+ ChromotingHostMessage* PrepareMessage(const gfx::Rect* rect);
// Submit |message| to |callback_|.
- void SubmitMessage(HostMessage* message, size_t rect_index);
+ void SubmitMessage(ChromotingHostMessage* message, size_t rect_index);
scoped_refptr<CaptureData> capture_data_;
scoped_ptr<DataAvailableCallback> callback_;
diff --git a/remoting/base/protocol/chromotocol.proto b/remoting/base/protocol/chromotocol.proto
index d6e587f..341b044 100644
--- a/remoting/base/protocol/chromotocol.proto
+++ b/remoting/base/protocol/chromotocol.proto
@@ -98,7 +98,7 @@ message UpdateStreamPacketMessage {
// Defines the message that is sent from the host to the client.
// Only one of these messages should be present.
// NEXT ID: 5
-message HostMessage {
+message ChromotingHostMessage {
optional InitClientMessage init_client= 1;
optional BeginUpdateStreamMessage begin_update_stream = 2;
optional EndUpdateStreamMessage end_update_stream = 3;
@@ -161,7 +161,7 @@ message MouseUpEvent {
// Defines the message that is sent from the client to the host.
// Only one of these messages should be present.
// NEXT ID: 7
-message ClientMessage {
+message ChromotingClientMessage {
optional KeyEvent key_event = 1;
optional MouseSetPositionEvent mouse_set_position_event = 2;
optional MouseMoveEvent mouse_move_event = 3;
diff --git a/remoting/base/protocol_decoder.cc b/remoting/base/protocol_decoder.cc
index 3724f5a..0dc8441 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<ClientMessage>(data, messages);
+ ParseMessages<ChromotingClientMessage>(data, messages);
}
void ProtocolDecoder::ParseHostMessages(scoped_refptr<media::DataBuffer> data,
HostMessageList* messages) {
- ParseMessages<HostMessage>(data, messages);
+ ParseMessages<ChromotingHostMessage>(data, messages);
}
template <typename T>
diff --git a/remoting/base/protocol_decoder.h b/remoting/base/protocol_decoder.h
index 119198f..b74da64 100644
--- a/remoting/base/protocol_decoder.h
+++ b/remoting/base/protocol_decoder.h
@@ -15,8 +15,8 @@
namespace remoting {
-typedef std::vector<HostMessage*> HostMessageList;
-typedef std::vector<ClientMessage*> ClientMessageList;
+typedef std::vector<ChromotingHostMessage*> HostMessageList;
+typedef std::vector<ChromotingClientMessage*> 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 c2473a8..da13a0d 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 HostMessage& msg,
+static void AppendMessage(const ChromotingHostMessage& 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.
- HostMessage msg;
+ ChromotingHostMessage msg;
msg.mutable_init_client()->set_width(kWidth);
msg.mutable_init_client()->set_height(kHeight);
AppendMessage(msg, &encoded_data);
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index 76f5b0c8..9226186 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -105,7 +105,7 @@ void ChromotingClient::HandleMessages(HostConnection* conn,
}
for (size_t i = 0; i < messages->size(); ++i) {
- HostMessage* msg = (*messages)[i];
+ ChromotingHostMessage* msg = (*messages)[i];
// TODO(ajwong): Consider creating a macro similar to the IPC message
// mappings. Also reconsider the lifetime of the message object.
if (msg->has_init_client()) {
@@ -175,10 +175,10 @@ void ChromotingClient::SetState(State s) {
Repaint();
}
-void ChromotingClient::InitClient(HostMessage* msg) {
+void ChromotingClient::InitClient(ChromotingHostMessage* msg) {
DCHECK_EQ(message_loop(), MessageLoop::current());
DCHECK(msg->has_init_client());
- scoped_ptr<HostMessage> deleter(msg);
+ scoped_ptr<ChromotingHostMessage> deleter(msg);
// Resize the window.
int width = msg->init_client().width();
@@ -191,21 +191,21 @@ void ChromotingClient::InitClient(HostMessage* msg) {
input_handler_->Initialize();
}
-void ChromotingClient::BeginUpdate(HostMessage* msg) {
+void ChromotingClient::BeginUpdate(ChromotingHostMessage* msg) {
DCHECK_EQ(message_loop(), MessageLoop::current());
DCHECK(msg->has_begin_update_stream());
view_->HandleBeginUpdateStream(msg);
}
-void ChromotingClient::HandleUpdate(HostMessage* msg) {
+void ChromotingClient::HandleUpdate(ChromotingHostMessage* msg) {
DCHECK_EQ(message_loop(), MessageLoop::current());
DCHECK(msg->has_update_stream_packet());
view_->HandleUpdateStreamPacket(msg);
}
-void ChromotingClient::EndUpdate(HostMessage* msg) {
+void ChromotingClient::EndUpdate(ChromotingHostMessage* msg) {
DCHECK_EQ(message_loop(), MessageLoop::current());
DCHECK(msg->has_end_update_stream());
diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h
index bdc2e26..c7026e3 100644
--- a/remoting/client/chromoting_client.h
+++ b/remoting/client/chromoting_client.h
@@ -65,10 +65,10 @@ class ChromotingClient : public HostConnection::HostEventCallback {
void SetState(State s);
// Handles for chromotocol messages.
- void InitClient(HostMessage* msg);
- void BeginUpdate(HostMessage* msg);
- void HandleUpdate(HostMessage* msg);
- void EndUpdate(HostMessage* msg);
+ void InitClient(ChromotingHostMessage* msg);
+ void BeginUpdate(ChromotingHostMessage* msg);
+ void HandleUpdate(ChromotingHostMessage* msg);
+ void EndUpdate(ChromotingHostMessage* msg);
// The following are not owned by this class.
ClientConfig config_;
diff --git a/remoting/client/chromoting_view.h b/remoting/client/chromoting_view.h
index a50b407..e094f79 100644
--- a/remoting/client/chromoting_view.h
+++ b/remoting/client/chromoting_view.h
@@ -9,7 +9,7 @@
namespace remoting {
-class HostMessage;
+class ChromotingHostMessage;
// ChromotingView defines the behavior of an object that draws a view of the
// remote desktop. Its main function is to choose the right decoder and render
@@ -47,13 +47,13 @@ class ChromotingView {
virtual void SetHostScreenSize(int width, int height) = 0;
// Handle the BeginUpdateStream message.
- virtual void HandleBeginUpdateStream(HostMessage* msg) = 0;
+ virtual void HandleBeginUpdateStream(ChromotingHostMessage* msg) = 0;
// Handle the UpdateStreamPacket message.
- virtual void HandleUpdateStreamPacket(HostMessage* msg) = 0;
+ virtual void HandleUpdateStreamPacket(ChromotingHostMessage* msg) = 0;
// Handle the EndUpdateStream message.
- virtual void HandleEndUpdateStream(HostMessage* msg) = 0;
+ virtual void HandleEndUpdateStream(ChromotingHostMessage* msg) = 0;
};
} // namespace remoting
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index 6715888..25c16bf 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -139,7 +139,7 @@ void PepperView::SetHostScreenSize(int width, int height) {
backing_store_height_ = height;
}
-void PepperView::HandleBeginUpdateStream(HostMessage* msg) {
+void PepperView::HandleBeginUpdateStream(ChromotingHostMessage* msg) {
if (!instance_->CurrentlyOnPluginThread()) {
RunTaskOnPluginThread(
NewRunnableMethod(this, &PepperView::HandleBeginUpdateStream,
@@ -147,7 +147,7 @@ void PepperView::HandleBeginUpdateStream(HostMessage* msg) {
return;
}
- scoped_ptr<HostMessage> deleter(msg);
+ scoped_ptr<ChromotingHostMessage> deleter(msg);
// TODO(hclam): Use the information from the message to create the decoder.
// We lazily construct the decoder.
@@ -169,7 +169,7 @@ void PepperView::HandleBeginUpdateStream(HostMessage* msg) {
NewRunnableMethod(this, &PepperView::OnDecodeDone));
}
-void PepperView::HandleUpdateStreamPacket(HostMessage* msg) {
+void PepperView::HandleUpdateStreamPacket(ChromotingHostMessage* msg) {
if (!instance_->CurrentlyOnPluginThread()) {
RunTaskOnPluginThread(
NewRunnableMethod(this, &PepperView::HandleUpdateStreamPacket,
@@ -180,7 +180,7 @@ void PepperView::HandleUpdateStreamPacket(HostMessage* msg) {
decoder_->PartialDecode(msg);
}
-void PepperView::HandleEndUpdateStream(HostMessage* msg) {
+void PepperView::HandleEndUpdateStream(ChromotingHostMessage* msg) {
if (!instance_->CurrentlyOnPluginThread()) {
RunTaskOnPluginThread(
NewRunnableMethod(this, &PepperView::HandleEndUpdateStream,
@@ -188,7 +188,7 @@ void PepperView::HandleEndUpdateStream(HostMessage* msg) {
return;
}
- scoped_ptr<HostMessage> deleter(msg);
+ scoped_ptr<ChromotingHostMessage> deleter(msg);
decoder_->EndDecode();
}
diff --git a/remoting/client/plugin/pepper_view.h b/remoting/client/plugin/pepper_view.h
index bb4557b..7cfa61b 100644
--- a/remoting/client/plugin/pepper_view.h
+++ b/remoting/client/plugin/pepper_view.h
@@ -44,9 +44,9 @@ class PepperView : public ChromotingView {
virtual void UnsetSolidFill();
virtual void SetViewport(int x, int y, int width, int height);
virtual void SetHostScreenSize(int width, int height);
- virtual void HandleBeginUpdateStream(HostMessage* msg);
- virtual void HandleUpdateStreamPacket(HostMessage* msg);
- virtual void HandleEndUpdateStream(HostMessage* msg);
+ virtual void HandleBeginUpdateStream(ChromotingHostMessage* msg);
+ virtual void HandleUpdateStreamPacket(ChromotingHostMessage* msg);
+ virtual void HandleEndUpdateStream(ChromotingHostMessage* msg);
private:
void OnPaintDone();
diff --git a/remoting/client/x11_input_handler.cc b/remoting/client/x11_input_handler.cc
index 455ff61..887862c 100644
--- a/remoting/client/x11_input_handler.cc
+++ b/remoting/client/x11_input_handler.cc
@@ -9,8 +9,8 @@
#include "remoting/client/x11_view.h"
#include "remoting/jingle_glue/jingle_thread.h"
-// Include Xlib at the end because it clashes with ClientMessage defined in
-// the protocol buffer.
+// Include Xlib at the end because it clashes with Status in
+// base/tracked_objects.h.
#include <X11/Xlib.h>
namespace remoting {
diff --git a/remoting/client/x11_view.cc b/remoting/client/x11_view.cc
index b733d93..ff51e9a 100644
--- a/remoting/client/x11_view.cc
+++ b/remoting/client/x11_view.cc
@@ -169,8 +169,8 @@ void X11View::InitPaintTarget() {
CHECK(picture_) << "Backing picture not created";
}
-void X11View::HandleBeginUpdateStream(HostMessage* msg) {
- scoped_ptr<HostMessage> deleter(msg);
+void X11View::HandleBeginUpdateStream(ChromotingHostMessage* msg) {
+ scoped_ptr<ChromotingHostMessage> deleter(msg);
// TODO(hclam): Use the information from the message to create the decoder.
// We lazily construct the decoder.
@@ -184,12 +184,12 @@ void X11View::HandleBeginUpdateStream(HostMessage* msg) {
NewRunnableMethod(this, &X11View::OnDecodeDone));
}
-void X11View::HandleUpdateStreamPacket(HostMessage* msg) {
+void X11View::HandleUpdateStreamPacket(ChromotingHostMessage* msg) {
decoder_->PartialDecode(msg);
}
-void X11View::HandleEndUpdateStream(HostMessage* msg) {
- scoped_ptr<HostMessage> deleter(msg);
+void X11View::HandleEndUpdateStream(ChromotingHostMessage* msg) {
+ scoped_ptr<ChromotingHostMessage> deleter(msg);
decoder_->EndDecode();
}
diff --git a/remoting/client/x11_view.h b/remoting/client/x11_view.h
index 2825575..1f1cc1c5 100644
--- a/remoting/client/x11_view.h
+++ b/remoting/client/x11_view.h
@@ -32,9 +32,9 @@ class X11View : public ChromotingView {
virtual void UnsetSolidFill();
virtual void SetViewport(int x, int y, int width, int height);
virtual void SetHostScreenSize(int width, int height);
- virtual void HandleBeginUpdateStream(HostMessage* msg);
- virtual void HandleUpdateStreamPacket(HostMessage* msg);
- virtual void HandleEndUpdateStream(HostMessage* msg) ;
+ virtual void HandleBeginUpdateStream(ChromotingHostMessage* msg);
+ virtual void HandleUpdateStreamPacket(ChromotingHostMessage* msg);
+ virtual void HandleEndUpdateStream(ChromotingHostMessage* msg) ;
Display* display() { return display_; }
diff --git a/remoting/host/client_connection.cc b/remoting/host/client_connection.cc
index 6c8516a..b6e8759 100644
--- a/remoting/host/client_connection.cc
+++ b/remoting/host/client_connection.cc
@@ -38,10 +38,10 @@ ClientConnection::~ClientConnection() {
// static
scoped_refptr<media::DataBuffer>
ClientConnection::CreateWireFormatDataBuffer(
- const HostMessage* msg) {
+ const ChromotingHostMessage* msg) {
// TODO(hclam): Instead of serializing |msg| create an DataBuffer
// object that wraps around it.
- scoped_ptr<const HostMessage> message_deleter(msg);
+ scoped_ptr<const ChromotingHostMessage> message_deleter(msg);
return SerializeAndFrameMessage(*msg);
}
@@ -53,7 +53,7 @@ void ClientConnection::SendInitClientMessage(int width, int height) {
if (!channel_)
return;
- HostMessage msg;
+ ChromotingHostMessage msg;
msg.mutable_init_client()->set_width(width);
msg.mutable_init_client()->set_height(height);
DCHECK(msg.IsInitialized());
@@ -67,7 +67,7 @@ void ClientConnection::SendBeginUpdateStreamMessage() {
if (!channel_)
return;
- HostMessage msg;
+ ChromotingHostMessage msg;
msg.mutable_begin_update_stream();
DCHECK(msg.IsInitialized());
@@ -96,7 +96,7 @@ void ClientConnection::SendEndUpdateStreamMessage() {
if (!channel_)
return;
- HostMessage msg;
+ ChromotingHostMessage msg;
msg.mutable_end_update_stream();
DCHECK(msg.IsInitialized());
diff --git a/remoting/host/client_connection.h b/remoting/host/client_connection.h
index c03a9bb..c139ff0 100644
--- a/remoting/host/client_connection.h
+++ b/remoting/host/client_connection.h
@@ -62,11 +62,11 @@ class ClientConnection : public base::RefCountedThreadSafe<ClientConnection>,
virtual ~ClientConnection();
- // Creates a DataBuffer object that wraps around HostMessage. The DataBuffer
- // object will be responsible for serializing and framing the message.
- // DataBuffer will also own |msg| after this call.
+ // Creates a DataBuffer object that wraps around ChromotingHostMessage. The
+ // DataBuffer object will be responsible for serializing and framing the
+ // message. DataBuffer will also own |msg| after this call.
static scoped_refptr<media::DataBuffer> CreateWireFormatDataBuffer(
- const HostMessage* msg);
+ const ChromotingHostMessage* msg);
virtual void set_jingle_channel(JingleChannel* channel) {
channel_ = channel;
@@ -84,11 +84,11 @@ class ClientConnection : public base::RefCountedThreadSafe<ClientConnection>,
// Send encoded update stream data to the viewer.
//
// |data| is the actual bytes in wire format. That means it is fully framed
- // and serialized from a HostMessage. This is a special case only for
- // UpdateStreamPacket to reduce the amount of memory copies.
+ // and serialized from a ChromotingHostMessage. This is a special case only
+ // for UpdateStreamPacket to reduce the amount of memory copies.
//
// |data| should be created by calling to
- // CreateWireFormatDataBuffer(HostMessage).
+ // CreateWireFormatDataBuffer(ChromotingHostMessage).
virtual void SendUpdateStreamPacketMessage(
scoped_refptr<media::DataBuffer> data);
diff --git a/remoting/host/session_manager.cc b/remoting/host/session_manager.cc
index f2cb3aa..b8747dd 100644
--- a/remoting/host/session_manager.cc
+++ b/remoting/host/session_manager.cc
@@ -319,7 +319,7 @@ void SessionManager::DoRateControl() {
ScheduleNextRateControl();
}
-void SessionManager::DoSendUpdate(HostMessage* message,
+void SessionManager::DoSendUpdate(ChromotingHostMessage* message,
Encoder::EncodingState state) {
DCHECK_EQ(network_loop_, MessageLoop::current());
@@ -393,7 +393,7 @@ void SessionManager::DoEncode(
}
void SessionManager::EncodeDataAvailableTask(
- HostMessage* message, Encoder::EncodingState state) {
+ ChromotingHostMessage* message, Encoder::EncodingState state) {
DCHECK_EQ(encode_loop_, MessageLoop::current());
// Before a new encode task starts, notify clients a new update
diff --git a/remoting/host/session_manager.h b/remoting/host/session_manager.h
index 83c437a..c39ca3b 100644
--- a/remoting/host/session_manager.h
+++ b/remoting/host/session_manager.h
@@ -131,7 +131,7 @@ class SessionManager : public base::RefCountedThreadSafe<SessionManager> {
void DoRateControl();
// DoSendUpdate takes ownership of header and is responsible for deleting it.
- void DoSendUpdate(HostMessage* message,
+ void DoSendUpdate(ChromotingHostMessage* message,
Encoder::EncodingState state);
void DoSendInit(scoped_refptr<ClientConnection> client,
int width, int height);
@@ -146,7 +146,7 @@ class SessionManager : public base::RefCountedThreadSafe<SessionManager> {
// EncodeDataAvailableTask takes ownership of header and is responsible for
// deleting it.
- void EncodeDataAvailableTask(HostMessage* message,
+ void EncodeDataAvailableTask(ChromotingHostMessage* message,
Encoder::EncodingState state);
// Message loops used by this class.
diff --git a/remoting/host/session_manager_unittest.cc b/remoting/host/session_manager_unittest.cc
index 29fa0f8..6747b01 100644
--- a/remoting/host/session_manager_unittest.cc
+++ b/remoting/host/session_manager_unittest.cc
@@ -106,7 +106,7 @@ TEST_F(SessionManagerTest, OneRecordCycle) {
.WillOnce(RunCallback(update_rects, data));
// Expect the encoder be called.
- HostMessage* msg = new HostMessage();
+ ChromotingHostMessage* msg = new ChromotingHostMessage();
EXPECT_CALL(*encoder_, Encode(data, false, NotNull()))
.WillOnce(FinishEncode(msg));