summaryrefslogtreecommitdiffstats
path: root/remoting/client
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 18:43:37 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 18:43:37 +0000
commit4d10edeb5f3db4366b4521c2346bfb4741c21e6f (patch)
tree98a0a1d7d295cc31c0840977dc15134c1271de31 /remoting/client
parent45b10f0917d6449aa53f66a6ea7fa6e8a4aea079 (diff)
downloadchromium_src-4d10edeb5f3db4366b4521c2346bfb4741c21e6f.zip
chromium_src-4d10edeb5f3db4366b4521c2346bfb4741c21e6f.tar.gz
chromium_src-4d10edeb5f3db4366b4521c2346bfb4741c21e6f.tar.bz2
HostMessageDispatcher to parse control messages
Changed MessageReader and MessageDecoder to support parsing in HostMessageDispatcher. BUG=None TEST=None Review URL: http://codereview.chromium.org/4017002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r--remoting/client/chromoting_client.cc1
-rw-r--r--remoting/client/chromoting_client.h5
-rw-r--r--remoting/client/host_connection.h3
-rw-r--r--remoting/client/jingle_host_connection.cc4
-rw-r--r--remoting/client/jingle_host_connection.h4
5 files changed, 11 insertions, 6 deletions
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index af3d8f1..95271be 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -11,6 +11,7 @@
#include "remoting/client/host_connection.h"
#include "remoting/client/input_handler.h"
#include "remoting/client/rectangle_update_decoder.h"
+#include "remoting/proto/internal.pb.h"
namespace remoting {
diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h
index 74fa35d..e476f31 100644
--- a/remoting/client/chromoting_client.h
+++ b/remoting/client/chromoting_client.h
@@ -7,11 +7,12 @@
#ifndef REMOTING_CLIENT_CHROMOTING_CLIENT_H
#define REMOTING_CLIENT_CHROMOTING_CLIENT_H
+#include <list>
+
#include "base/task.h"
#include "remoting/client/host_connection.h"
#include "remoting/client/client_config.h"
#include "remoting/client/chromoting_view.h"
-#include "remoting/protocol/messages_decoder.h"
class MessageLoop;
@@ -89,7 +90,7 @@ class ChromotingClient : public HostConnection::HostEventCallback {
// processed.
//
// Used to serialize sending of messages to the client.
- HostMessageList received_messages_;
+ std::list<ChromotingHostMessage*> received_messages_;
// True if a message is being processed. Can be used to determine if it is
// safe to dispatch another message.
diff --git a/remoting/client/host_connection.h b/remoting/client/host_connection.h
index 74c2a6d..7121025 100644
--- a/remoting/client/host_connection.h
+++ b/remoting/client/host_connection.h
@@ -7,7 +7,8 @@
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
-#include "remoting/protocol/messages_decoder.h"
+#include "remoting/proto/internal.pb.h"
+#include "remoting/protocol/message_decoder.h"
namespace remoting {
diff --git a/remoting/client/jingle_host_connection.cc b/remoting/client/jingle_host_connection.cc
index 76c17d5..9a5fe65 100644
--- a/remoting/client/jingle_host_connection.cc
+++ b/remoting/client/jingle_host_connection.cc
@@ -5,6 +5,8 @@
#include "base/callback.h"
#include "base/message_loop.h"
#include "remoting/base/constants.h"
+// TODO(hclam): Remove this header once MessageDispatcher is used.
+#include "remoting/base/multiple_array_input_stream.h"
#include "remoting/client/client_config.h"
#include "remoting/client/jingle_host_connection.h"
#include "remoting/jingle_glue/jingle_thread.h"
@@ -149,7 +151,7 @@ void JingleHostConnection::OnConnectionStateChange(
case ChromotocolConnection::CONNECTED:
// Initialize reader and writer.
event_writer_.Init(connection_->event_channel());
- video_reader_.Init(
+ video_reader_.Init<ChromotingHostMessage>(
connection_->video_channel(),
NewCallback(this, &JingleHostConnection::OnVideoMessage));
event_callback_->OnConnectionOpened(this);
diff --git a/remoting/client/jingle_host_connection.h b/remoting/client/jingle_host_connection.h
index ee5240f..df37702 100644
--- a/remoting/client/jingle_host_connection.h
+++ b/remoting/client/jingle_host_connection.h
@@ -25,9 +25,9 @@
#include "remoting/client/client_context.h"
#include "remoting/client/host_connection.h"
#include "remoting/jingle_glue/jingle_client.h"
+#include "remoting/protocol/message_reader.h"
#include "remoting/protocol/chromotocol_connection.h"
#include "remoting/protocol/chromotocol_server.h"
-#include "remoting/protocol/stream_reader.h"
#include "remoting/protocol/stream_writer.h"
class MessageLoop;
@@ -85,7 +85,7 @@ class JingleHostConnection : public HostConnection,
scoped_refptr<ChromotocolConnection> connection_;
EventStreamWriter event_writer_;
- VideoStreamReader video_reader_;
+ MessageReader video_reader_;
HostEventCallback* event_callback_;