summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-04 22:44:41 +0000
committergarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-04 22:44:41 +0000
commitd11535a810717cd12a32a1a98080b2029c838547 (patch)
treebfb4ef1af1d49e6db34c932af52e3dd143f67f67
parentd5805b3d99d2d2b3774416cc754221a63a714ad2 (diff)
downloadchromium_src-d11535a810717cd12a32a1a98080b2029c838547.zip
chromium_src-d11535a810717cd12a32a1a98080b2029c838547.tar.gz
chromium_src-d11535a810717cd12a32a1a98080b2029c838547.tar.bz2
Chromoting: Rename HostConnection to ConnectionToHost
BUG=none TEST=build chrome, chromoting Review URL: http://codereview.chromium.org/4457002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65121 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--remoting/client/chromoting_client.cc12
-rw-r--r--remoting/client/chromoting_client.h18
-rw-r--r--remoting/client/input_handler.cc4
-rw-r--r--remoting/client/input_handler.h6
-rw-r--r--remoting/client/plugin/chromoting_instance.cc6
-rw-r--r--remoting/client/plugin/chromoting_instance.h8
-rw-r--r--remoting/client/plugin/pepper_input_handler.cc2
-rw-r--r--remoting/client/plugin/pepper_input_handler.h2
-rw-r--r--remoting/client/x11_client.cc4
-rw-r--r--remoting/client/x11_input_handler.cc2
-rw-r--r--remoting/client/x11_input_handler.h2
-rw-r--r--remoting/protocol/connection_to_host.h (renamed from remoting/client/host_connection.h)24
-rw-r--r--remoting/protocol/jingle_connection_to_host.cc (renamed from remoting/client/jingle_host_connection.cc)41
-rw-r--r--remoting/protocol/jingle_connection_to_host.h (renamed from remoting/client/jingle_host_connection.h)28
-rw-r--r--remoting/remoting.gyp6
15 files changed, 83 insertions, 82 deletions
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index edb1ce3..ce3cedc 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -8,16 +8,16 @@
#include "remoting/base/tracer.h"
#include "remoting/client/chromoting_view.h"
#include "remoting/client/client_context.h"
-#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"
+#include "remoting/protocol/connection_to_host.h"
namespace remoting {
ChromotingClient::ChromotingClient(const ClientConfig& config,
ClientContext* context,
- protocol::HostConnection* connection,
+ protocol::ConnectionToHost* connection,
ChromotingView* view,
RectangleUpdateDecoder* rectangle_decoder,
InputHandler* input_handler,
@@ -93,7 +93,7 @@ void ChromotingClient::SetViewport(int x, int y, int width, int height) {
view_->SetViewport(x, y, width, height);
}
-void ChromotingClient::HandleMessage(protocol::HostConnection* conn,
+void ChromotingClient::HandleMessage(protocol::ConnectionToHost* conn,
ChromotingHostMessage* msg) {
if (message_loop() != MessageLoop::current()) {
message_loop()->PostTask(
@@ -146,17 +146,17 @@ void ChromotingClient::DispatchPacket() {
*packet, NewTracedMethod(this, &ChromotingClient::OnPacketDone));
}
-void ChromotingClient::OnConnectionOpened(protocol::HostConnection* conn) {
+void ChromotingClient::OnConnectionOpened(protocol::ConnectionToHost* conn) {
VLOG(1) << "ChromotingClient::OnConnectionOpened";
SetConnectionState(CONNECTED);
}
-void ChromotingClient::OnConnectionClosed(protocol::HostConnection* conn) {
+void ChromotingClient::OnConnectionClosed(protocol::ConnectionToHost* conn) {
VLOG(1) << "ChromotingClient::OnConnectionClosed";
SetConnectionState(DISCONNECTED);
}
-void ChromotingClient::OnConnectionFailed(protocol::HostConnection* conn) {
+void ChromotingClient::OnConnectionFailed(protocol::ConnectionToHost* conn) {
VLOG(1) << "ChromotingClient::OnConnectionFailed";
SetConnectionState(FAILED);
}
diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h
index bb7688a..9ef2b39 100644
--- a/remoting/client/chromoting_client.h
+++ b/remoting/client/chromoting_client.h
@@ -10,9 +10,9 @@
#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/connection_to_host.h"
#include "remoting/protocol/video_stub.h"
class MessageLoop;
@@ -26,13 +26,13 @@ class InputHandler;
class RectangleUpdateDecoder;
// TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder.
-class ChromotingClient : public protocol::HostConnection::HostEventCallback,
+class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
public protocol::VideoStub {
public:
// Objects passed in are not owned by this class.
ChromotingClient(const ClientConfig& config,
ClientContext* context,
- protocol::HostConnection* connection,
+ protocol::ConnectionToHost* connection,
ChromotingView* view,
RectangleUpdateDecoder* rectangle_decoder,
InputHandler* input_handler,
@@ -54,12 +54,12 @@ class ChromotingClient : public protocol::HostConnection::HostEventCallback,
// thread synchronously really.
virtual void SetViewport(int x, int y, int width, int height);
- // HostConnection::HostEventCallback implementation.
- virtual void HandleMessage(protocol::HostConnection* conn,
+ // ConnectionToHost::HostEventCallback implementation.
+ virtual void HandleMessage(protocol::ConnectionToHost* conn,
ChromotingHostMessage* messages);
- virtual void OnConnectionOpened(protocol::HostConnection* conn);
- virtual void OnConnectionClosed(protocol::HostConnection* conn);
- virtual void OnConnectionFailed(protocol::HostConnection* conn);
+ virtual void OnConnectionOpened(protocol::ConnectionToHost* conn);
+ virtual void OnConnectionClosed(protocol::ConnectionToHost* conn);
+ virtual void OnConnectionFailed(protocol::ConnectionToHost* conn);
// VideoStub implementation.
virtual void ProcessVideoPacket(const VideoPacket* packet, Task* done);
@@ -90,7 +90,7 @@ class ChromotingClient : public protocol::HostConnection::HostEventCallback,
// The following are not owned by this class.
ClientConfig config_;
ClientContext* context_;
- protocol::HostConnection* connection_;
+ protocol::ConnectionToHost* connection_;
ChromotingView* view_;
RectangleUpdateDecoder* rectangle_decoder_;
InputHandler* input_handler_;
diff --git a/remoting/client/input_handler.cc b/remoting/client/input_handler.cc
index c9a7fe7..d2a8f0d 100644
--- a/remoting/client/input_handler.cc
+++ b/remoting/client/input_handler.cc
@@ -5,14 +5,14 @@
#include "remoting/client/input_handler.h"
#include "remoting/client/chromoting_view.h"
-#include "remoting/client/host_connection.h"
// TODO(hclam): Should not include internal.pb.h.
#include "remoting/proto/internal.pb.h"
+#include "remoting/protocol/connection_to_host.h"
namespace remoting {
InputHandler::InputHandler(ClientContext* context,
- protocol::HostConnection* connection,
+ protocol::ConnectionToHost* connection,
ChromotingView* view)
: context_(context),
connection_(connection),
diff --git a/remoting/client/input_handler.h b/remoting/client/input_handler.h
index 91af063..dd1f3ae 100644
--- a/remoting/client/input_handler.h
+++ b/remoting/client/input_handler.h
@@ -15,13 +15,13 @@ class ClientContext;
class ChromotingView;
namespace protocol {
-class HostConnection;
+class ConnectionToHost;
} // namespace protocol
class InputHandler {
public:
InputHandler(ClientContext* context,
- protocol::HostConnection* connection,
+ protocol::ConnectionToHost* connection,
ChromotingView* view);
virtual ~InputHandler() {}
@@ -33,7 +33,7 @@ class InputHandler {
void SendMouseButtonEvent(bool down, MouseButton button);
ClientContext* context_;
- protocol::HostConnection* connection_;
+ protocol::ConnectionToHost* connection_;
ChromotingView* view_;
private:
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 80ce290..20f2147 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -16,13 +16,13 @@
#include "remoting/client/client_config.h"
#include "remoting/client/client_util.h"
#include "remoting/client/chromoting_client.h"
-#include "remoting/client/host_connection.h"
-#include "remoting/client/jingle_host_connection.h"
#include "remoting/client/rectangle_update_decoder.h"
#include "remoting/client/plugin/chromoting_scriptable_object.h"
#include "remoting/client/plugin/pepper_input_handler.h"
#include "remoting/client/plugin/pepper_view.h"
#include "remoting/jingle_glue/jingle_thread.h"
+#include "remoting/protocol/connection_to_host.h"
+#include "remoting/protocol/jingle_connection_to_host.h"
namespace remoting {
@@ -67,7 +67,7 @@ bool ChromotingInstance::Init(uint32_t argc,
context_.Start();
// Create the chromoting objects.
- host_connection_.reset(new protocol::JingleHostConnection(&context_));
+ host_connection_.reset(new protocol::JingleConnectionToHost(&context_));
view_.reset(new PepperView(this, &context_));
rectangle_decoder_.reset(
new RectangleUpdateDecoder(context_.decode_message_loop(), view_.get()));
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index 9f6bec2..29a3bbf 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -18,8 +18,8 @@
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/var.h"
#include "remoting/client/client_context.h"
-#include "remoting/client/host_connection.h"
#include "remoting/client/plugin/chromoting_scriptable_object.h"
+#include "remoting/protocol/connection_to_host.h"
class MessageLoop;
struct PP_InputEvent;
@@ -34,6 +34,10 @@ class Module;
namespace remoting {
+namespace protocol {
+class ConnectionToHost;
+} // namespace protocol
+
class ChromotingClient;
class ClientContext;
class InputHandler;
@@ -77,7 +81,7 @@ class ChromotingInstance : public pp::Instance {
MessageLoop* pepper_main_loop_dont_post_to_me_;
ClientContext context_;
- scoped_ptr<protocol::HostConnection> host_connection_;
+ scoped_ptr<protocol::ConnectionToHost> host_connection_;
scoped_ptr<PepperView> view_;
scoped_ptr<RectangleUpdateDecoder> rectangle_decoder_;
scoped_ptr<InputHandler> input_handler_;
diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc
index 3398cf4..3c4f00a 100644
--- a/remoting/client/plugin/pepper_input_handler.cc
+++ b/remoting/client/plugin/pepper_input_handler.cc
@@ -9,7 +9,7 @@
namespace remoting {
PepperInputHandler::PepperInputHandler(ClientContext* context,
- protocol::HostConnection* connection,
+ protocol::ConnectionToHost* connection,
ChromotingView* view)
: InputHandler(context, connection, view) {
}
diff --git a/remoting/client/plugin/pepper_input_handler.h b/remoting/client/plugin/pepper_input_handler.h
index 14df881..8d5bebe 100644
--- a/remoting/client/plugin/pepper_input_handler.h
+++ b/remoting/client/plugin/pepper_input_handler.h
@@ -16,7 +16,7 @@ namespace remoting {
class PepperInputHandler : public InputHandler {
public:
PepperInputHandler(ClientContext* context,
- protocol::HostConnection* connection,
+ protocol::ConnectionToHost* connection,
ChromotingView* view);
virtual ~PepperInputHandler();
diff --git a/remoting/client/x11_client.cc b/remoting/client/x11_client.cc
index 91d32d6..77158d78 100644
--- a/remoting/client/x11_client.cc
+++ b/remoting/client/x11_client.cc
@@ -10,10 +10,10 @@
#include "remoting/client/chromoting_client.h"
#include "remoting/client/client_config.h"
#include "remoting/client/client_util.h"
-#include "remoting/client/jingle_host_connection.h"
#include "remoting/client/rectangle_update_decoder.h"
#include "remoting/client/x11_view.h"
#include "remoting/client/x11_input_handler.h"
+#include "remoting/protocol/jingle_connection_to_host.h"
void ClientQuit(MessageLoop* loop) {
loop->PostTask(FROM_HERE, new MessageLoop::QuitTask());
@@ -30,7 +30,7 @@ int main(int argc, char** argv) {
MessageLoop ui_loop;
remoting::ClientContext context;
- remoting::protocol::JingleHostConnection connection(&context);
+ remoting::protocol::JingleConnectionToHost connection(&context);
remoting::X11View view;
remoting::RectangleUpdateDecoder rectangle_decoder(
context.decode_message_loop(), &view);
diff --git a/remoting/client/x11_input_handler.cc b/remoting/client/x11_input_handler.cc
index 84a21c3..4c3d142 100644
--- a/remoting/client/x11_input_handler.cc
+++ b/remoting/client/x11_input_handler.cc
@@ -17,7 +17,7 @@
namespace remoting {
X11InputHandler::X11InputHandler(ClientContext* context,
- protocol::HostConnection* connection,
+ protocol::ConnectionToHost* connection,
ChromotingView* view)
: InputHandler(context, connection, view) {
}
diff --git a/remoting/client/x11_input_handler.h b/remoting/client/x11_input_handler.h
index 3dd34d7..3ea9a6c 100644
--- a/remoting/client/x11_input_handler.h
+++ b/remoting/client/x11_input_handler.h
@@ -15,7 +15,7 @@ class ChromotingView;
class X11InputHandler : public InputHandler {
public:
X11InputHandler(ClientContext* context,
- protocol::HostConnection* connection,
+ protocol::ConnectionToHost* connection,
ChromotingView* view);
virtual ~X11InputHandler();
diff --git a/remoting/client/host_connection.h b/remoting/protocol/connection_to_host.h
index 9cdcbc1..7905c18 100644
--- a/remoting/client/host_connection.h
+++ b/remoting/protocol/connection_to_host.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef REMOTING_CLIENT_HOST_CONNECTION_H_
-#define REMOTING_CLIENT_HOST_CONNECTION_H_
+#ifndef REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
+#define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
@@ -18,28 +18,28 @@ namespace protocol {
class VideoStub;
-class HostConnection {
+class ConnectionToHost {
public:
class HostEventCallback {
public:
virtual ~HostEventCallback() {}
- // Handles an event received by the HostConnection. Ownership of
+ // Handles an event received by the protocol::ConnectionToHost. Ownership of
// the message is passed to the callee.
- virtual void HandleMessage(HostConnection* conn,
+ virtual void HandleMessage(ConnectionToHost* conn,
ChromotingHostMessage* message) = 0;
// Called when the network connection is opened.
- virtual void OnConnectionOpened(HostConnection* conn) = 0;
+ virtual void OnConnectionOpened(ConnectionToHost* conn) = 0;
// Called when the network connection is closed.
- virtual void OnConnectionClosed(HostConnection* conn) = 0;
+ virtual void OnConnectionClosed(ConnectionToHost* conn) = 0;
// Called when the network connection has failed.
- virtual void OnConnectionFailed(HostConnection* conn) = 0;
+ virtual void OnConnectionFailed(ConnectionToHost* conn) = 0;
};
- virtual ~HostConnection() {}
+ virtual ~ConnectionToHost() {}
// TODO(ajwong): We need to generalize this API.
virtual void Connect(const ClientConfig& config,
@@ -51,13 +51,13 @@ class HostConnection {
virtual void SendEvent(const ChromotingClientMessage& msg) = 0;
protected:
- HostConnection() {}
+ ConnectionToHost() {}
private:
- DISALLOW_COPY_AND_ASSIGN(HostConnection);
+ DISALLOW_COPY_AND_ASSIGN(ConnectionToHost);
};
} // namespace protocol
} // namespace remoting
-#endif // REMOTING_CLIENT_HOST_CONNECTION_H_
+#endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
diff --git a/remoting/client/jingle_host_connection.cc b/remoting/protocol/jingle_connection_to_host.cc
index 62a1841..e76184e 100644
--- a/remoting/client/jingle_host_connection.cc
+++ b/remoting/protocol/jingle_connection_to_host.cc
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "remoting/protocol/jingle_connection_to_host.h"
+
#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"
#include "remoting/protocol/jingle_session_manager.h"
#include "remoting/protocol/video_reader.h"
@@ -18,15 +19,15 @@
namespace remoting {
namespace protocol {
-JingleHostConnection::JingleHostConnection(ClientContext* context)
+JingleConnectionToHost::JingleConnectionToHost(ClientContext* context)
: context_(context),
event_callback_(NULL) {
}
-JingleHostConnection::~JingleHostConnection() {
+JingleConnectionToHost::~JingleConnectionToHost() {
}
-void JingleHostConnection::Connect(const ClientConfig& config,
+void JingleConnectionToHost::Connect(const ClientConfig& config,
HostEventCallback* event_callback,
VideoStub* video_stub) {
event_callback_ = event_callback;
@@ -42,11 +43,11 @@ void JingleHostConnection::Connect(const ClientConfig& config,
host_jid_ = config.host_jid;
}
-void JingleHostConnection::Disconnect() {
+void JingleConnectionToHost::Disconnect() {
if (MessageLoop::current() != message_loop()) {
message_loop()->PostTask(
FROM_HERE, NewRunnableMethod(this,
- &JingleHostConnection::Disconnect));
+ &JingleConnectionToHost::Disconnect));
return;
}
@@ -56,17 +57,17 @@ void JingleHostConnection::Disconnect() {
if (session_) {
session_->Close(
- NewRunnableMethod(this, &JingleHostConnection::OnDisconnected));
+ NewRunnableMethod(this, &JingleConnectionToHost::OnDisconnected));
} else {
OnDisconnected();
}
}
-void JingleHostConnection::OnControlMessage(ChromotingHostMessage* msg) {
+void JingleConnectionToHost::OnControlMessage(ChromotingHostMessage* msg) {
event_callback_->HandleMessage(this, msg);
}
-void JingleHostConnection::InitSession() {
+void JingleConnectionToHost::InitSession() {
DCHECK_EQ(message_loop(), MessageLoop::current());
// Initialize chromotocol |session_manager_|.
@@ -77,7 +78,7 @@ void JingleHostConnection::InitSession() {
session_manager->Init(
jingle_client_->GetFullJid(),
jingle_client_->session_manager(),
- NewCallback(this, &JingleHostConnection::OnNewSession));
+ NewCallback(this, &JingleConnectionToHost::OnNewSession));
session_manager_ = session_manager;
CandidateChromotocolConfig* candidate_config =
@@ -88,21 +89,21 @@ void JingleHostConnection::InitSession() {
// Initialize |session_|.
session_ = session_manager_->Connect(
host_jid_, candidate_config,
- NewCallback(this, &JingleHostConnection::OnSessionStateChange));
+ NewCallback(this, &JingleConnectionToHost::OnSessionStateChange));
}
-void JingleHostConnection::OnDisconnected() {
+void JingleConnectionToHost::OnDisconnected() {
session_ = NULL;
if (session_manager_) {
session_manager_->Close(
- NewRunnableMethod(this, &JingleHostConnection::OnServerClosed));
+ NewRunnableMethod(this, &JingleConnectionToHost::OnServerClosed));
} else {
OnServerClosed();
}
}
-void JingleHostConnection::OnServerClosed() {
+void JingleConnectionToHost::OnServerClosed() {
session_manager_ = NULL;
if (jingle_client_) {
jingle_client_->Close();
@@ -110,13 +111,13 @@ void JingleHostConnection::OnServerClosed() {
}
}
-void JingleHostConnection::SendEvent(const ChromotingClientMessage& msg) {
+void JingleConnectionToHost::SendEvent(const ChromotingClientMessage& msg) {
// This drops the message if we are not connected yet.
event_writer_.SendMessage(msg);
}
// JingleClient::Callback interface.
-void JingleHostConnection::OnStateChange(JingleClient* client,
+void JingleConnectionToHost::OnStateChange(JingleClient* client,
JingleClient::State state) {
DCHECK_EQ(message_loop(), MessageLoop::current());
DCHECK(client);
@@ -131,14 +132,14 @@ void JingleHostConnection::OnStateChange(JingleClient* client,
}
}
-void JingleHostConnection::OnNewSession(protocol::Session* session,
+void JingleConnectionToHost::OnNewSession(protocol::Session* session,
protocol::SessionManager::IncomingSessionResponse* response) {
DCHECK_EQ(message_loop(), MessageLoop::current());
// Client always rejects incoming sessions.
*response = protocol::SessionManager::DECLINE;
}
-void JingleHostConnection::OnSessionStateChange(
+void JingleConnectionToHost::OnSessionStateChange(
protocol::Session::State state) {
DCHECK_EQ(message_loop(), MessageLoop::current());
DCHECK(event_callback_);
@@ -156,7 +157,7 @@ void JingleHostConnection::OnSessionStateChange(
// Initialize reader and writer.
control_reader_.Init<ChromotingHostMessage>(
session_->control_channel(),
- NewCallback(this, &JingleHostConnection::OnControlMessage));
+ NewCallback(this, &JingleConnectionToHost::OnControlMessage));
event_writer_.Init(session_->event_channel());
video_reader_.reset(VideoReader::Create(session_->config()));
video_reader_->Init(session_, video_stub_);
@@ -169,7 +170,7 @@ void JingleHostConnection::OnSessionStateChange(
}
}
-MessageLoop* JingleHostConnection::message_loop() {
+MessageLoop* JingleConnectionToHost::message_loop() {
return context_->jingle_thread()->message_loop();
}
diff --git a/remoting/client/jingle_host_connection.h b/remoting/protocol/jingle_connection_to_host.h
index a7362fb..931b5b3 100644
--- a/remoting/client/jingle_host_connection.h
+++ b/remoting/protocol/jingle_connection_to_host.h
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// JingleHostConnection implements the HostConnection interface using
+// JingleConnectionToHost implements the ConnectionToHost interface using
// libjingle as the transport protocol.
//
// Much of this class focuses on translating JingleClient and
-// ChromotingConnection callbacks into HostConnection::HostEventCallback
+// ChromotingConnection callbacks into ConnectionToHost::HostEventCallback
// messages.
//
// The public API of this class is designed to be asynchronous, and thread
@@ -16,15 +16,15 @@
// during construction. Any event handlers running on the |network_thread|
// should not block.
-#ifndef REMOTING_CLIENT_JINGLE_HOST_CONNECTION_H_
-#define REMOTING_CLIENT_JINGLE_HOST_CONNECTION_H_
+#ifndef REMOTING_PROTOCOL_JINGLE_CONNECTION_TO_HOST_H_
+#define REMOTING_PROTOCOL_JINGLE_CONNECTION_TO_HOST_H_
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
#include "remoting/client/client_context.h"
-#include "remoting/client/host_connection.h"
#include "remoting/jingle_glue/jingle_client.h"
+#include "remoting/protocol/connection_to_host.h"
#include "remoting/protocol/message_reader.h"
#include "remoting/protocol/session.h"
#include "remoting/protocol/session_manager.h"
@@ -33,20 +33,16 @@
class MessageLoop;
namespace remoting {
-
-struct ClientConfig;
-class JingleThread;
-
namespace protocol {
class VideoReader;
class VideoStub;
-class JingleHostConnection : public HostConnection,
- public JingleClient::Callback {
+class JingleConnectionToHost : public ConnectionToHost,
+ public JingleClient::Callback {
public:
- explicit JingleHostConnection(ClientContext* context);
- virtual ~JingleHostConnection();
+ explicit JingleConnectionToHost(ClientContext* context);
+ virtual ~JingleConnectionToHost();
virtual void Connect(const ClientConfig& config,
HostEventCallback* event_callback,
@@ -100,12 +96,12 @@ class JingleHostConnection : public HostConnection,
std::string host_jid_;
- DISALLOW_COPY_AND_ASSIGN(JingleHostConnection);
+ DISALLOW_COPY_AND_ASSIGN(JingleConnectionToHost);
};
} // namespace protocol
} // namespace remoting
-DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::protocol::JingleHostConnection);
+DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::protocol::JingleConnectionToHost);
-#endif // REMOTING_CLIENT_JINGLE_HOST_CONNECTION_H_
+#endif // REMOTING_PROTOCOL_JINGLE_CONNECTION_TO_HOST_H_
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index 628504f..d4ae91f 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -269,11 +269,8 @@
'client/client_util.cc',
'client/client_util.h',
'client/frame_consumer.h',
- 'client/host_connection.h',
'client/input_handler.cc',
'client/input_handler.h',
- 'client/jingle_host_connection.cc',
- 'client/jingle_host_connection.h',
'client/rectangle_update_decoder.cc',
'client/rectangle_update_decoder.h',
],
@@ -365,6 +362,7 @@
'protocol/chromotocol_config.h',
'protocol/connection_to_client.cc',
'protocol/connection_to_client.h',
+ 'protocol/connection_to_host.h',
'protocol/host_control_message_handler.h',
'protocol/host_event_message_handler.h',
'protocol/host_message_dispatcher.cc',
@@ -377,6 +375,8 @@
'protocol/protobuf_video_reader.h',
'protocol/protobuf_video_writer.cc',
'protocol/protobuf_video_writer.h',
+ 'protocol/jingle_connection_to_host.cc',
+ 'protocol/jingle_connection_to_host.h',
'protocol/jingle_session.cc',
'protocol/jingle_session.h',
'protocol/jingle_session_manager.cc',