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(scoped_refptr<XmppProxy> xmpp_proxy); | 53 void Start(scoped_refptr<XmppProxy> xmpp_proxy); |
54 void Stop(const base::Closure& shutdown_task); | 54 void Stop(const base::Closure& shutdown_task); |
55 void ClientDone(); | 55 void ClientDone(); |
56 | 56 |
57 // Return the stats recorded by this client. | 57 // Return the stats recorded by this client. |
58 ChromotingStats* GetStats(); | 58 ChromotingStats* GetStats(); |
59 | 59 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 void OnDisconnected(const base::Closure& shutdown_task); | 112 void OnDisconnected(const base::Closure& shutdown_task); |
113 | 113 |
114 // The following are not owned by this class. | 114 // The following are not owned by this class. |
115 ClientConfig config_; | 115 ClientConfig config_; |
116 ClientContext* context_; | 116 ClientContext* context_; |
117 protocol::ConnectionToHost* connection_; | 117 protocol::ConnectionToHost* connection_; |
118 ChromotingView* view_; | 118 ChromotingView* view_; |
119 RectangleUpdateDecoder* rectangle_decoder_; | 119 RectangleUpdateDecoder* rectangle_decoder_; |
120 InputHandler* input_handler_; | 120 InputHandler* input_handler_; |
121 ClientLogger* logger_; | 121 Logger* logger_; |
122 | 122 |
123 // If non-NULL, this is called when the client is done. | 123 // If non-NULL, this is called when the client is done. |
124 Task* client_done_; | 124 Task* client_done_; |
125 | 125 |
126 ConnectionState state_; | 126 ConnectionState state_; |
127 | 127 |
128 // Contains all video packets that have been received, but have not yet been | 128 // Contains all video packets that have been received, but have not yet been |
129 // processed. | 129 // processed. |
130 // | 130 // |
131 // Used to serialize sending of messages to the client. | 131 // Used to serialize sending of messages to the client. |
(...skipping 10 matching lines...) Expand all Loading... |
142 int64 last_sequence_number_; | 142 int64 last_sequence_number_; |
143 | 143 |
144 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); | 144 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); |
145 }; | 145 }; |
146 | 146 |
147 } // namespace remoting | 147 } // namespace remoting |
148 | 148 |
149 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingClient); | 149 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingClient); |
150 | 150 |
151 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ | 151 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ |
OLD | NEW |