| 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; |
| 33 class InputHandler; | 34 class InputHandler; |
| 34 class RectangleUpdateDecoder; | 35 class RectangleUpdateDecoder; |
| 35 | 36 |
| 36 // TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder. | 37 // TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder. |
| 37 class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, | 38 class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, |
| 38 public protocol::ClientStub, | 39 public protocol::ClientStub, |
| 39 public protocol::VideoStub { | 40 public protocol::VideoStub { |
| 40 public: | 41 public: |
| 41 // Objects passed in are not owned by this class. | 42 // Objects passed in are not owned by this class. |
| 42 ChromotingClient(const ClientConfig& config, | 43 ChromotingClient(const ClientConfig& config, |
| 43 ClientContext* context, | 44 ClientContext* context, |
| 44 protocol::ConnectionToHost* connection, | 45 protocol::ConnectionToHost* connection, |
| 45 ChromotingView* view, | 46 ChromotingView* view, |
| 46 RectangleUpdateDecoder* rectangle_decoder, | 47 RectangleUpdateDecoder* rectangle_decoder, |
| 47 InputHandler* input_handler, | 48 InputHandler* input_handler, |
| 49 ClientLogger* logger, |
| 48 Task* client_done); | 50 Task* client_done); |
| 49 virtual ~ChromotingClient(); | 51 virtual ~ChromotingClient(); |
| 50 | 52 |
| 51 void Start(); | 53 void Start(); |
| 52 void StartSandboxed(scoped_refptr<XmppProxy> xmpp_proxy, | 54 void StartSandboxed(scoped_refptr<XmppProxy> xmpp_proxy, |
| 53 const std::string& your_jid, | 55 const std::string& your_jid, |
| 54 const std::string& host_jid); | 56 const std::string& host_jid); |
| 55 void Stop(); | 57 void Stop(); |
| 56 void ClientDone(); | 58 void ClientDone(); |
| 57 | 59 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // the packet will start to be processed. | 112 // the packet will start to be processed. |
| 111 void OnPacketDone(bool last_packet, base::Time decode_start); | 113 void OnPacketDone(bool last_packet, base::Time decode_start); |
| 112 | 114 |
| 113 // The following are not owned by this class. | 115 // The following are not owned by this class. |
| 114 ClientConfig config_; | 116 ClientConfig config_; |
| 115 ClientContext* context_; | 117 ClientContext* context_; |
| 116 protocol::ConnectionToHost* connection_; | 118 protocol::ConnectionToHost* connection_; |
| 117 ChromotingView* view_; | 119 ChromotingView* view_; |
| 118 RectangleUpdateDecoder* rectangle_decoder_; | 120 RectangleUpdateDecoder* rectangle_decoder_; |
| 119 InputHandler* input_handler_; | 121 InputHandler* input_handler_; |
| 122 ClientLogger* logger_; |
| 120 | 123 |
| 121 // If non-NULL, this is called when the client is done. | 124 // If non-NULL, this is called when the client is done. |
| 122 Task* client_done_; | 125 Task* client_done_; |
| 123 | 126 |
| 124 ConnectionState state_; | 127 ConnectionState state_; |
| 125 | 128 |
| 126 // Contains all video packets that have been received, but have not yet been | 129 // Contains all video packets that have been received, but have not yet been |
| 127 // processed. | 130 // processed. |
| 128 // | 131 // |
| 129 // Used to serialize sending of messages to the client. | 132 // Used to serialize sending of messages to the client. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 140 int64 last_sequence_number_; | 143 int64 last_sequence_number_; |
| 141 | 144 |
| 142 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); | 145 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); |
| 143 }; | 146 }; |
| 144 | 147 |
| 145 } // namespace remoting | 148 } // namespace remoting |
| 146 | 149 |
| 147 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingClient); | 150 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingClient); |
| 148 | 151 |
| 149 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ | 152 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ |
| OLD | NEW |