OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ | 5 #ifndef REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ |
6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ | 6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 140 |
141 // If logging is enabled, logs the current connection statistics, and | 141 // If logging is enabled, logs the current connection statistics, and |
142 // triggers another call to this function after the logging time interval. | 142 // triggers another call to this function after the logging time interval. |
143 // Called on the network thread. | 143 // Called on the network thread. |
144 void LogPerfStats(); | 144 void LogPerfStats(); |
145 | 145 |
146 // Used to obtain task runner references and make calls to Java methods. | 146 // Used to obtain task runner references and make calls to Java methods. |
147 ChromotingJniRuntime* jni_runtime_; | 147 ChromotingJniRuntime* jni_runtime_; |
148 | 148 |
149 // ID of the host we are connecting to. | 149 // ID of the host we are connecting to. |
150 std::string host_id_; | |
151 std::string host_jid_; | 150 std::string host_jid_; |
152 | 151 |
| 152 protocol::ClientAuthenticationConfig client_auth_config_; |
| 153 |
153 std::string flags_; | 154 std::string flags_; |
154 | 155 |
155 // This group of variables is to be used on the network thread. | 156 // This group of variables is to be used on the network thread. |
156 scoped_ptr<ClientContext> client_context_; | 157 scoped_ptr<ClientContext> client_context_; |
157 scoped_ptr<protocol::PerformanceTracker> perf_tracker_; | 158 scoped_ptr<protocol::PerformanceTracker> perf_tracker_; |
158 scoped_ptr<JniFrameConsumer> view_; | 159 scoped_ptr<JniFrameConsumer> view_; |
159 scoped_ptr<protocol::VideoRenderer> video_renderer_; | 160 scoped_ptr<protocol::VideoRenderer> video_renderer_; |
160 scoped_ptr<protocol::Authenticator> authenticator_; | |
161 scoped_ptr<ChromotingClient> client_; | 161 scoped_ptr<ChromotingClient> client_; |
162 XmppSignalStrategy::XmppServerConfig xmpp_config_; | 162 XmppSignalStrategy::XmppServerConfig xmpp_config_; |
163 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ | 163 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ |
164 scoped_ptr<ClientStatusLogger> client_status_logger_; | 164 scoped_ptr<ClientStatusLogger> client_status_logger_; |
165 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_; | 165 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_; |
166 | 166 |
167 // Pass this the user's PIN once we have it. To be assigned and accessed on | 167 // Pass this the user's PIN once we have it. To be assigned and accessed on |
168 // the UI thread, but must be posted to the network thread to call it. | 168 // the UI thread, but must be posted to the network thread to call it. |
169 protocol::SecretFetchedCallback pin_callback_; | 169 protocol::SecretFetchedCallback pin_callback_; |
170 | 170 |
171 // Indicates whether to establish a new pairing with this host. This is | 171 // Indicates whether to establish a new pairing with this host. This is |
172 // modified in ProvideSecret(), but thereafter to be used only from the | 172 // modified in ProvideSecret(), but thereafter to be used only from the |
173 // network thread. (This is safe because ProvideSecret() is invoked at most | 173 // network thread. (This is safe because ProvideSecret() is invoked at most |
174 // once per run, and always before any reference to this flag.) | 174 // once per run, and always before any reference to this flag.) |
175 bool create_pairing_; | 175 bool create_pairing_ = false; |
176 | 176 |
177 // The device name to appear in the paired-clients list. Accessed on the | 177 // The device name to appear in the paired-clients list. Accessed on the |
178 // network thread. | 178 // network thread. |
179 std::string device_name_; | 179 std::string device_name_; |
180 | 180 |
181 // If this is true, performance statistics will be periodically written to | 181 // If this is true, performance statistics will be periodically written to |
182 // the Android log. Used on the network thread. | 182 // the Android log. Used on the network thread. |
183 bool stats_logging_enabled_; | 183 bool stats_logging_enabled_ = false; |
184 | 184 |
185 // The set of capabilities supported by the client. Accessed on the network | 185 // The set of capabilities supported by the client. Accessed on the network |
186 // thread. Once SetCapabilities() is called, this will contain the negotiated | 186 // thread. Once SetCapabilities() is called, this will contain the negotiated |
187 // set of capabilities for this remoting session. | 187 // set of capabilities for this remoting session. |
188 std::string capabilities_; | 188 std::string capabilities_; |
189 | 189 |
190 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; | 190 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; |
191 | 191 |
192 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; | 192 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; |
193 | 193 |
194 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); | 194 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); |
195 }; | 195 }; |
196 | 196 |
197 } // namespace remoting | 197 } // namespace remoting |
198 | 198 |
199 #endif | 199 #endif |
OLD | NEW |