Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(775)

Side by Side Diff: remoting/client/jni/chromoting_jni_instance.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/client/jni/android_keymap.h ('k') | remoting/client/jni/chromoting_jni_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/client/jni/android_keymap.h ('k') | remoting/client/jni/chromoting_jni_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698