| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // ChromotingClient is the controller for the Client implementation. | 5 // ChromotingClient is the controller for the Client implementation. |
| 6 | 6 |
| 7 #ifndef REMOTING_CLIENT_CHROMOTING_CLIENT_H_ | 7 #ifndef REMOTING_CLIENT_CHROMOTING_CLIENT_H_ |
| 8 #define REMOTING_CLIENT_CHROMOTING_CLIENT_H_ | 8 #define REMOTING_CLIENT_CHROMOTING_CLIENT_H_ |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class MessageLoop; | 23 class MessageLoop; |
| 24 | 24 |
| 25 namespace remoting { | 25 namespace remoting { |
| 26 | 26 |
| 27 namespace protocol { | 27 namespace protocol { |
| 28 class LocalLoginStatus; | 28 class LocalLoginStatus; |
| 29 class NotifyResolutionRequest; | 29 class NotifyResolutionRequest; |
| 30 } // namespace protocol | 30 } // namespace protocol |
| 31 | 31 |
| 32 class ClientContext; | 32 class ClientContext; |
| 33 class ClientLogger; | |
| 34 class InputHandler; | 33 class InputHandler; |
| 34 class Logger; |
| 35 class RectangleUpdateDecoder; | 35 class RectangleUpdateDecoder; |
| 36 | 36 |
| 37 // TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder. | 37 // TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder. |
| 38 class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, | 38 class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, |
| 39 public protocol::ClientStub, | 39 public protocol::ClientStub, |
| 40 public protocol::VideoStub { | 40 public protocol::VideoStub { |
| 41 public: | 41 public: |
| 42 // Objects passed in are not owned by this class. | 42 // Objects passed in are not owned by this class. |
| 43 ChromotingClient(const ClientConfig& config, | 43 ChromotingClient(const ClientConfig& config, |
| 44 ClientContext* context, | 44 ClientContext* context, |
| 45 protocol::ConnectionToHost* connection, | 45 protocol::ConnectionToHost* connection, |
| 46 ChromotingView* view, | 46 ChromotingView* view, |
| 47 RectangleUpdateDecoder* rectangle_decoder, | 47 RectangleUpdateDecoder* rectangle_decoder, |
| 48 InputHandler* input_handler, | 48 InputHandler* input_handler, |
| 49 ClientLogger* logger, | 49 Logger* logger, |
| 50 Task* client_done); | 50 Task* client_done); |
| 51 virtual ~ChromotingClient(); | 51 virtual ~ChromotingClient(); |
| 52 | 52 |
| 53 void Start(); | 53 void Start(); |
| 54 void StartSandboxed(scoped_refptr<XmppProxy> xmpp_proxy); | 54 void StartSandboxed(scoped_refptr<XmppProxy> xmpp_proxy); |
| 55 void Stop(); | 55 void Stop(); |
| 56 void ClientDone(); | 56 void ClientDone(); |
| 57 | 57 |
| 58 // Return the stats recorded by this client. | 58 // Return the stats recorded by this client. |
| 59 ChromotingStats* GetStats(); | 59 ChromotingStats* GetStats(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // the packet will start to be processed. | 110 // the packet will start to be processed. |
| 111 void OnPacketDone(bool last_packet, base::Time decode_start); | 111 void OnPacketDone(bool last_packet, base::Time decode_start); |
| 112 | 112 |
| 113 // The following are not owned by this class. | 113 // The following are not owned by this class. |
| 114 ClientConfig config_; | 114 ClientConfig config_; |
| 115 ClientContext* context_; | 115 ClientContext* context_; |
| 116 protocol::ConnectionToHost* connection_; | 116 protocol::ConnectionToHost* connection_; |
| 117 ChromotingView* view_; | 117 ChromotingView* view_; |
| 118 RectangleUpdateDecoder* rectangle_decoder_; | 118 RectangleUpdateDecoder* rectangle_decoder_; |
| 119 InputHandler* input_handler_; | 119 InputHandler* input_handler_; |
| 120 ClientLogger* logger_; | 120 Logger* logger_; |
| 121 | 121 |
| 122 // If non-NULL, this is called when the client is done. | 122 // If non-NULL, this is called when the client is done. |
| 123 Task* client_done_; | 123 Task* client_done_; |
| 124 | 124 |
| 125 ConnectionState state_; | 125 ConnectionState state_; |
| 126 | 126 |
| 127 // Contains all video packets that have been received, but have not yet been | 127 // Contains all video packets that have been received, but have not yet been |
| 128 // processed. | 128 // processed. |
| 129 // | 129 // |
| 130 // Used to serialize sending of messages to the client. | 130 // Used to serialize sending of messages to the client. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 141 int64 last_sequence_number_; | 141 int64 last_sequence_number_; |
| 142 | 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); | 143 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace remoting | 146 } // namespace remoting |
| 147 | 147 |
| 148 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingClient); | 148 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingClient); |
| 149 | 149 |
| 150 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ | 150 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ |
| OLD | NEW |