diff options
Diffstat (limited to 'remoting/client')
-rw-r--r-- | remoting/client/chromoting_client.cc | 10 | ||||
-rw-r--r-- | remoting/client/chromoting_client.h | 16 | ||||
-rw-r--r-- | remoting/client/host_connection.h | 7 | ||||
-rw-r--r-- | remoting/client/input_handler.cc | 2 | ||||
-rw-r--r-- | remoting/client/input_handler.h | 7 | ||||
-rw-r--r-- | remoting/client/jingle_host_connection.cc | 3 | ||||
-rw-r--r-- | remoting/client/jingle_host_connection.h | 12 | ||||
-rw-r--r-- | remoting/client/plugin/chromoting_instance.cc | 2 | ||||
-rw-r--r-- | remoting/client/plugin/chromoting_instance.h | 7 | ||||
-rw-r--r-- | remoting/client/plugin/pepper_input_handler.cc | 2 | ||||
-rw-r--r-- | remoting/client/plugin/pepper_input_handler.h | 2 | ||||
-rw-r--r-- | remoting/client/x11_client.cc | 2 | ||||
-rw-r--r-- | remoting/client/x11_input_handler.cc | 2 | ||||
-rw-r--r-- | remoting/client/x11_input_handler.h | 2 |
14 files changed, 45 insertions, 31 deletions
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc index c47ecd8..edb1ce3 100644 --- a/remoting/client/chromoting_client.cc +++ b/remoting/client/chromoting_client.cc @@ -17,7 +17,7 @@ namespace remoting { ChromotingClient::ChromotingClient(const ClientConfig& config, ClientContext* context, - HostConnection* connection, + protocol::HostConnection* 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(HostConnection* conn, +void ChromotingClient::HandleMessage(protocol::HostConnection* 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(HostConnection* conn) { +void ChromotingClient::OnConnectionOpened(protocol::HostConnection* conn) { VLOG(1) << "ChromotingClient::OnConnectionOpened"; SetConnectionState(CONNECTED); } -void ChromotingClient::OnConnectionClosed(HostConnection* conn) { +void ChromotingClient::OnConnectionClosed(protocol::HostConnection* conn) { VLOG(1) << "ChromotingClient::OnConnectionClosed"; SetConnectionState(DISCONNECTED); } -void ChromotingClient::OnConnectionFailed(HostConnection* conn) { +void ChromotingClient::OnConnectionFailed(protocol::HostConnection* conn) { VLOG(1) << "ChromotingClient::OnConnectionFailed"; SetConnectionState(FAILED); } diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h index 57e799c..bb7688a 100644 --- a/remoting/client/chromoting_client.h +++ b/remoting/client/chromoting_client.h @@ -26,13 +26,13 @@ class InputHandler; class RectangleUpdateDecoder; // TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder. -class ChromotingClient : public HostConnection::HostEventCallback, - public VideoStub { +class ChromotingClient : public protocol::HostConnection::HostEventCallback, + public protocol::VideoStub { public: // Objects passed in are not owned by this class. ChromotingClient(const ClientConfig& config, ClientContext* context, - HostConnection* connection, + protocol::HostConnection* connection, ChromotingView* view, RectangleUpdateDecoder* rectangle_decoder, InputHandler* input_handler, @@ -55,11 +55,11 @@ class ChromotingClient : public HostConnection::HostEventCallback, virtual void SetViewport(int x, int y, int width, int height); // HostConnection::HostEventCallback implementation. - virtual void HandleMessage(HostConnection* conn, + virtual void HandleMessage(protocol::HostConnection* conn, ChromotingHostMessage* messages); - virtual void OnConnectionOpened(HostConnection* conn); - virtual void OnConnectionClosed(HostConnection* conn); - virtual void OnConnectionFailed(HostConnection* conn); + virtual void OnConnectionOpened(protocol::HostConnection* conn); + virtual void OnConnectionClosed(protocol::HostConnection* conn); + virtual void OnConnectionFailed(protocol::HostConnection* conn); // VideoStub implementation. virtual void ProcessVideoPacket(const VideoPacket* packet, Task* done); @@ -90,7 +90,7 @@ class ChromotingClient : public HostConnection::HostEventCallback, // The following are not owned by this class. ClientConfig config_; ClientContext* context_; - HostConnection* connection_; + protocol::HostConnection* connection_; ChromotingView* view_; RectangleUpdateDecoder* rectangle_decoder_; InputHandler* input_handler_; diff --git a/remoting/client/host_connection.h b/remoting/client/host_connection.h index 3d27ceb..9cdcbc1 100644 --- a/remoting/client/host_connection.h +++ b/remoting/client/host_connection.h @@ -12,10 +12,12 @@ namespace remoting { -class VideoStub; - struct ClientConfig; +namespace protocol { + +class VideoStub; + class HostConnection { public: class HostEventCallback { @@ -55,6 +57,7 @@ class HostConnection { DISALLOW_COPY_AND_ASSIGN(HostConnection); }; +} // namespace protocol } // namespace remoting #endif // REMOTING_CLIENT_HOST_CONNECTION_H_ diff --git a/remoting/client/input_handler.cc b/remoting/client/input_handler.cc index 69c70c5..c9a7fe7 100644 --- a/remoting/client/input_handler.cc +++ b/remoting/client/input_handler.cc @@ -12,7 +12,7 @@ namespace remoting { InputHandler::InputHandler(ClientContext* context, - HostConnection* connection, + protocol::HostConnection* connection, ChromotingView* view) : context_(context), connection_(connection), diff --git a/remoting/client/input_handler.h b/remoting/client/input_handler.h index 6f2e376..91af063 100644 --- a/remoting/client/input_handler.h +++ b/remoting/client/input_handler.h @@ -13,12 +13,15 @@ namespace remoting { class ClientContext; class ChromotingView; + +namespace protocol { class HostConnection; +} // namespace protocol class InputHandler { public: InputHandler(ClientContext* context, - HostConnection* connection, + protocol::HostConnection* connection, ChromotingView* view); virtual ~InputHandler() {} @@ -30,7 +33,7 @@ class InputHandler { void SendMouseButtonEvent(bool down, MouseButton button); ClientContext* context_; - HostConnection* connection_; + protocol::HostConnection* connection_; ChromotingView* view_; private: diff --git a/remoting/client/jingle_host_connection.cc b/remoting/client/jingle_host_connection.cc index aa55c84..62a1841 100644 --- a/remoting/client/jingle_host_connection.cc +++ b/remoting/client/jingle_host_connection.cc @@ -11,10 +11,12 @@ #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" #include "remoting/protocol/video_stub.h" #include "remoting/protocol/util.h" namespace remoting { +namespace protocol { JingleHostConnection::JingleHostConnection(ClientContext* context) : context_(context), @@ -171,4 +173,5 @@ MessageLoop* JingleHostConnection::message_loop() { return context_->jingle_thread()->message_loop(); } +} // namespace protocol } // namespace remoting diff --git a/remoting/client/jingle_host_connection.h b/remoting/client/jingle_host_connection.h index 16d0b14..a7362fb 100644 --- a/remoting/client/jingle_host_connection.h +++ b/remoting/client/jingle_host_connection.h @@ -29,17 +29,18 @@ #include "remoting/protocol/session.h" #include "remoting/protocol/session_manager.h" #include "remoting/protocol/stream_writer.h" -#include "remoting/protocol/video_reader.h" class MessageLoop; namespace remoting { +struct ClientConfig; +class JingleThread; + namespace protocol { -class VideoStub; -} // namespace protocol -struct ClientConfig; +class VideoReader; +class VideoStub; class JingleHostConnection : public HostConnection, public JingleClient::Callback { @@ -102,8 +103,9 @@ class JingleHostConnection : public HostConnection, DISALLOW_COPY_AND_ASSIGN(JingleHostConnection); }; +} // namespace protocol } // namespace remoting -DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::JingleHostConnection); +DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::protocol::JingleHostConnection); #endif // REMOTING_CLIENT_JINGLE_HOST_CONNECTION_H_ diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc index 67979c0..80ce290 100644 --- a/remoting/client/plugin/chromoting_instance.cc +++ b/remoting/client/plugin/chromoting_instance.cc @@ -67,7 +67,7 @@ bool ChromotingInstance::Init(uint32_t argc, context_.Start(); // Create the chromoting objects. - host_connection_.reset(new JingleHostConnection(&context_)); + host_connection_.reset(new protocol::JingleHostConnection(&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 f706478..9f6bec2 100644 --- a/remoting/client/plugin/chromoting_instance.h +++ b/remoting/client/plugin/chromoting_instance.h @@ -36,12 +36,15 @@ namespace remoting { class ChromotingClient; class ClientContext; -class HostConnection; class InputHandler; class JingleThread; class PepperView; class RectangleUpdateDecoder; +namespace protocol { +class HostConnection; +} // namespace protocol + class ChromotingInstance : public pp::Instance { public: // The mimetype for which this plugin is registered. @@ -74,7 +77,7 @@ class ChromotingInstance : public pp::Instance { MessageLoop* pepper_main_loop_dont_post_to_me_; ClientContext context_; - scoped_ptr<HostConnection> host_connection_; + scoped_ptr<protocol::HostConnection> 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 5599655..3398cf4 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, - HostConnection* connection, + protocol::HostConnection* 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 f7ad657..14df881 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, - HostConnection* connection, + protocol::HostConnection* connection, ChromotingView* view); virtual ~PepperInputHandler(); diff --git a/remoting/client/x11_client.cc b/remoting/client/x11_client.cc index 258f20f..91d32d6 100644 --- a/remoting/client/x11_client.cc +++ b/remoting/client/x11_client.cc @@ -30,7 +30,7 @@ int main(int argc, char** argv) { MessageLoop ui_loop; remoting::ClientContext context; - remoting::JingleHostConnection connection(&context); + remoting::protocol::JingleHostConnection 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 bd63af9..84a21c3 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, - HostConnection* connection, + protocol::HostConnection* connection, ChromotingView* view) : InputHandler(context, connection, view) { } diff --git a/remoting/client/x11_input_handler.h b/remoting/client/x11_input_handler.h index e84e4b9..3dd34d7 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, - HostConnection* connection, + protocol::HostConnection* connection, ChromotingView* view); virtual ~X11InputHandler(); |