| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/weak_ptr.h" |
| 13 #include "base/time.h" | 14 #include "base/time.h" |
| 14 #include "remoting/base/scoped_thread_proxy.h" | |
| 15 #include "remoting/client/client_config.h" | 15 #include "remoting/client/client_config.h" |
| 16 #include "remoting/client/chromoting_stats.h" | 16 #include "remoting/client/chromoting_stats.h" |
| 17 #include "remoting/client/chromoting_view.h" | 17 #include "remoting/client/chromoting_view.h" |
| 18 #include "remoting/protocol/client_stub.h" | 18 #include "remoting/protocol/client_stub.h" |
| 19 #include "remoting/protocol/clipboard_stub.h" | 19 #include "remoting/protocol/clipboard_stub.h" |
| 20 #include "remoting/protocol/connection_to_host.h" | 20 #include "remoting/protocol/connection_to_host.h" |
| 21 #include "remoting/protocol/input_stub.h" | 21 #include "remoting/protocol/input_stub.h" |
| 22 #include "remoting/protocol/video_stub.h" | 22 #include "remoting/protocol/video_stub.h" |
| 23 #include "remoting/jingle_glue/xmpp_proxy.h" | 23 #include "remoting/jingle_glue/xmpp_proxy.h" |
| 24 | 24 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // True if a message is being processed. Can be used to determine if it is | 113 // True if a message is being processed. Can be used to determine if it is |
| 114 // safe to dispatch another message. | 114 // safe to dispatch another message. |
| 115 bool packet_being_processed_; | 115 bool packet_being_processed_; |
| 116 | 116 |
| 117 // Record the statistics of the connection. | 117 // Record the statistics of the connection. |
| 118 ChromotingStats stats_; | 118 ChromotingStats stats_; |
| 119 | 119 |
| 120 // Keep track of the last sequence number bounced back from the host. | 120 // Keep track of the last sequence number bounced back from the host. |
| 121 int64 last_sequence_number_; | 121 int64 last_sequence_number_; |
| 122 | 122 |
| 123 ScopedThreadProxy thread_proxy_; | 123 // WeakPtr used to avoid tasks accessing the client after it is deleted. |
| 124 base::WeakPtrFactory<ChromotingClient> weak_factory_; |
| 125 base::WeakPtr<ChromotingClient> weak_ptr_; |
| 124 | 126 |
| 125 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); | 127 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); |
| 126 }; | 128 }; |
| 127 | 129 |
| 128 } // namespace remoting | 130 } // namespace remoting |
| 129 | 131 |
| 130 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ | 132 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ |
| OLD | NEW |