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 <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "remoting/client/chromoting_client.h" | 15 #include "remoting/client/chromoting_client.h" |
16 #include "remoting/client/client_context.h" | 16 #include "remoting/client/client_context.h" |
17 #include "remoting/client/client_user_interface.h" | 17 #include "remoting/client/client_user_interface.h" |
18 #include "remoting/proto/control.pb.h" | 18 #include "remoting/proto/control.pb.h" |
19 #include "remoting/proto/event.pb.h" | 19 #include "remoting/proto/event.pb.h" |
20 #include "remoting/protocol/clipboard_stub.h" | 20 #include "remoting/protocol/clipboard_stub.h" |
21 #include "remoting/protocol/cursor_shape_stub.h" | 21 #include "remoting/protocol/cursor_shape_stub.h" |
22 #include "remoting/signaling/xmpp_signal_strategy.h" | 22 #include "remoting/signaling/xmpp_signal_strategy.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 ChromotingJniRuntime* jni_runtime_; | 149 ChromotingJniRuntime* jni_runtime_; |
150 | 150 |
151 // ID of the host we are connecting to. | 151 // ID of the host we are connecting to. |
152 std::string host_jid_; | 152 std::string host_jid_; |
153 | 153 |
154 protocol::ClientAuthenticationConfig client_auth_config_; | 154 protocol::ClientAuthenticationConfig client_auth_config_; |
155 | 155 |
156 std::string flags_; | 156 std::string flags_; |
157 | 157 |
158 // This group of variables is to be used on the network thread. | 158 // This group of variables is to be used on the network thread. |
159 scoped_ptr<ClientContext> client_context_; | 159 std::unique_ptr<ClientContext> client_context_; |
160 scoped_ptr<protocol::PerformanceTracker> perf_tracker_; | 160 std::unique_ptr<protocol::PerformanceTracker> perf_tracker_; |
161 scoped_ptr<JniFrameConsumer> view_; | 161 std::unique_ptr<JniFrameConsumer> view_; |
162 scoped_ptr<protocol::VideoRenderer> video_renderer_; | 162 std::unique_ptr<protocol::VideoRenderer> video_renderer_; |
163 scoped_ptr<ChromotingClient> client_; | 163 std::unique_ptr<ChromotingClient> client_; |
164 XmppSignalStrategy::XmppServerConfig xmpp_config_; | 164 XmppSignalStrategy::XmppServerConfig xmpp_config_; |
165 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ | 165 std::unique_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ |
166 scoped_ptr<ClientStatusLogger> client_status_logger_; | 166 std::unique_ptr<ClientStatusLogger> client_status_logger_; |
167 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_; | 167 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_; |
168 | 168 |
169 // Pass this the user's PIN once we have it. To be assigned and accessed on | 169 // Pass this the user's PIN once we have it. To be assigned and accessed on |
170 // the UI thread, but must be posted to the network thread to call it. | 170 // the UI thread, but must be posted to the network thread to call it. |
171 protocol::SecretFetchedCallback pin_callback_; | 171 protocol::SecretFetchedCallback pin_callback_; |
172 | 172 |
173 // Indicates whether to establish a new pairing with this host. This is | 173 // Indicates whether to establish a new pairing with this host. This is |
174 // modified in ProvideSecret(), but thereafter to be used only from the | 174 // modified in ProvideSecret(), but thereafter to be used only from the |
175 // network thread. (This is safe because ProvideSecret() is invoked at most | 175 // network thread. (This is safe because ProvideSecret() is invoked at most |
176 // once per run, and always before any reference to this flag.) | 176 // once per run, and always before any reference to this flag.) |
(...skipping 15 matching lines...) Expand all Loading... |
192 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; | 192 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; |
193 | 193 |
194 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; | 194 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; |
195 | 195 |
196 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); | 196 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); |
197 }; | 197 }; |
198 | 198 |
199 } // namespace remoting | 199 } // namespace remoting |
200 | 200 |
201 #endif | 201 #endif |
OLD | NEW |