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 13 matching lines...) Expand all Loading... |
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 InputHandler; | 33 class InputHandler; |
34 class Logger; | |
35 class RectangleUpdateDecoder; | 34 class RectangleUpdateDecoder; |
36 | 35 |
37 // TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder. | 36 // TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder. |
38 class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, | 37 class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, |
39 public protocol::ClientStub, | 38 public protocol::ClientStub, |
40 public protocol::VideoStub { | 39 public protocol::VideoStub { |
41 public: | 40 public: |
42 // Objects passed in are not owned by this class. | 41 // Objects passed in are not owned by this class. |
43 ChromotingClient(const ClientConfig& config, | 42 ChromotingClient(const ClientConfig& config, |
44 ClientContext* context, | 43 ClientContext* context, |
45 protocol::ConnectionToHost* connection, | 44 protocol::ConnectionToHost* connection, |
46 ChromotingView* view, | 45 ChromotingView* view, |
47 RectangleUpdateDecoder* rectangle_decoder, | 46 RectangleUpdateDecoder* rectangle_decoder, |
48 InputHandler* input_handler, | 47 InputHandler* input_handler, |
49 Logger* logger, | |
50 Task* client_done); | 48 Task* client_done); |
51 virtual ~ChromotingClient(); | 49 virtual ~ChromotingClient(); |
52 | 50 |
53 void Start(scoped_refptr<XmppProxy> xmpp_proxy); | 51 void Start(scoped_refptr<XmppProxy> xmpp_proxy); |
54 void Stop(const base::Closure& shutdown_task); | 52 void Stop(const base::Closure& shutdown_task); |
55 void ClientDone(); | 53 void ClientDone(); |
56 | 54 |
57 // Return the stats recorded by this client. | 55 // Return the stats recorded by this client. |
58 ChromotingStats* GetStats(); | 56 ChromotingStats* GetStats(); |
59 | 57 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 100 |
103 void OnDisconnected(const base::Closure& shutdown_task); | 101 void OnDisconnected(const base::Closure& shutdown_task); |
104 | 102 |
105 // The following are not owned by this class. | 103 // The following are not owned by this class. |
106 ClientConfig config_; | 104 ClientConfig config_; |
107 ClientContext* context_; | 105 ClientContext* context_; |
108 protocol::ConnectionToHost* connection_; | 106 protocol::ConnectionToHost* connection_; |
109 ChromotingView* view_; | 107 ChromotingView* view_; |
110 RectangleUpdateDecoder* rectangle_decoder_; | 108 RectangleUpdateDecoder* rectangle_decoder_; |
111 InputHandler* input_handler_; | 109 InputHandler* input_handler_; |
112 Logger* logger_; | |
113 | 110 |
114 // If non-NULL, this is called when the client is done. | 111 // If non-NULL, this is called when the client is done. |
115 Task* client_done_; | 112 Task* client_done_; |
116 | 113 |
117 ConnectionState state_; | 114 ConnectionState state_; |
118 | 115 |
119 // Contains all video packets that have been received, but have not yet been | 116 // Contains all video packets that have been received, but have not yet been |
120 // processed. | 117 // processed. |
121 // | 118 // |
122 // Used to serialize sending of messages to the client. | 119 // Used to serialize sending of messages to the client. |
(...skipping 10 matching lines...) Expand all Loading... |
133 int64 last_sequence_number_; | 130 int64 last_sequence_number_; |
134 | 131 |
135 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); | 132 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); |
136 }; | 133 }; |
137 | 134 |
138 } // namespace remoting | 135 } // namespace remoting |
139 | 136 |
140 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingClient); | 137 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingClient); |
141 | 138 |
142 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ | 139 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ |
OLD | NEW |