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

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

Issue 2101833002: [Remoting Android] DisplayUpdaterFactory cleanups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback Created 4 years, 5 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
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_JNI_CHROMOTING_JNI_INSTANCE_H_ 5 #ifndef REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_
6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ 6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 10 matching lines...) Expand all
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"
23 23
24 namespace remoting { 24 namespace remoting {
25 25
26 namespace protocol { 26 namespace protocol {
27 class ClipboardEvent; 27 class ClipboardEvent;
28 class CursorShapeInfo; 28 class CursorShapeInfo;
29 class PerformanceTracker; 29 class PerformanceTracker;
30 class FrameConsumer; 30 class FrameConsumer;
31 class VideoRenderer;
31 } // namespace protocol 32 } // namespace protocol
32 33
33 class AudioPlayerAndroid; 34 class AudioPlayerAndroid;
34 class ChromotingJniRuntime; 35 class ChromotingJniRuntime;
35 class JniClient; 36 class JniClient;
36 class JniVideoRenderer;
37 class DisplayHandler; 37 class DisplayHandler;
38 class JniPairingSecretFetcher; 38 class JniPairingSecretFetcher;
39 39
40 // ChromotingJniInstance is scoped to the session. 40 // ChromotingJniInstance is scoped to the session.
41 // This class is Created on the UI thread but thereafter it is used and 41 // This class is Created on the UI thread but thereafter it is used and
42 // destroyed on the network thread. Except where indicated, all methods are 42 // destroyed on the network thread. Except where indicated, all methods are
43 // called on the network thread. 43 // called on the network thread.
44 class ChromotingJniInstance 44 class ChromotingJniInstance
45 : public ClientUserInterface, 45 : public ClientUserInterface,
46 public protocol::ClipboardStub { 46 public protocol::ClipboardStub {
47 public: 47 public:
48 // Initiates a connection with the specified host. Call from the UI thread. 48 // Initiates a connection with the specified host. Call from the UI thread.
49 // The instance does not take ownership of |jni_runtime|. To connect with an 49 // The instance does not take ownership of |jni_runtime|. To connect with an
50 // unpaired host, pass in |pairing_id| and |pairing_secret| as empty strings. 50 // unpaired host, pass in |pairing_id| and |pairing_secret| as empty strings.
51 ChromotingJniInstance(ChromotingJniRuntime* jni_runtime, 51 ChromotingJniInstance(ChromotingJniRuntime* jni_runtime,
52 base::WeakPtr<JniClient> jni_client, 52 base::WeakPtr<JniClient> jni_client,
53 base::WeakPtr<JniPairingSecretFetcher> secret_fetcher, 53 base::WeakPtr<JniPairingSecretFetcher> secret_fetcher,
54 std::unique_ptr<protocol::CursorShapeStub> cursor_stub, 54 std::unique_ptr<protocol::CursorShapeStub> cursor_stub,
55 std::unique_ptr<JniVideoRenderer> video_renderer, 55 std::unique_ptr<protocol::VideoRenderer> video_renderer,
56 const std::string& username, 56 const std::string& username,
57 const std::string& auth_token, 57 const std::string& auth_token,
58 const std::string& host_jid, 58 const std::string& host_jid,
59 const std::string& host_id, 59 const std::string& host_id,
60 const std::string& host_pubkey, 60 const std::string& host_pubkey,
61 const std::string& pairing_id, 61 const std::string& pairing_id,
62 const std::string& pairing_secret, 62 const std::string& pairing_secret,
63 const std::string& capabilities, 63 const std::string& capabilities,
64 const std::string& flags); 64 const std::string& flags);
65 65
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 std::string host_jid_; 162 std::string host_jid_;
163 163
164 protocol::ClientAuthenticationConfig client_auth_config_; 164 protocol::ClientAuthenticationConfig client_auth_config_;
165 165
166 std::string flags_; 166 std::string flags_;
167 167
168 // This group of variables is to be used on the network thread. 168 // This group of variables is to be used on the network thread.
169 std::unique_ptr<ClientContext> client_context_; 169 std::unique_ptr<ClientContext> client_context_;
170 std::unique_ptr<protocol::PerformanceTracker> perf_tracker_; 170 std::unique_ptr<protocol::PerformanceTracker> perf_tracker_;
171 std::unique_ptr<protocol::CursorShapeStub> cursor_shape_stub_; 171 std::unique_ptr<protocol::CursorShapeStub> cursor_shape_stub_;
172 std::unique_ptr<JniVideoRenderer> video_renderer_; 172 std::unique_ptr<protocol::VideoRenderer> video_renderer_;
173 std::unique_ptr<ChromotingClient> client_; 173 std::unique_ptr<ChromotingClient> client_;
174 XmppSignalStrategy::XmppServerConfig xmpp_config_; 174 XmppSignalStrategy::XmppServerConfig xmpp_config_;
175 std::unique_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ 175 std::unique_ptr<XmppSignalStrategy> signaling_; // Must outlive client_
176 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_; 176 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_;
177 177
178 std::unique_ptr<AudioPlayerAndroid> audio_player_; 178 std::unique_ptr<AudioPlayerAndroid> audio_player_;
179 179
180 // Indicates whether to establish a new pairing with this host. This is 180 // Indicates whether to establish a new pairing with this host. This is
181 // modified in ProvideSecret(), but thereafter to be used only from the 181 // modified in ProvideSecret(), but thereafter to be used only from the
182 // network thread. (This is safe because ProvideSecret() is invoked at most 182 // network thread. (This is safe because ProvideSecret() is invoked at most
(...skipping 18 matching lines...) Expand all
201 bool connected_ = false; 201 bool connected_ = false;
202 202
203 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; 203 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_;
204 204
205 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); 205 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance);
206 }; 206 };
207 207
208 } // namespace remoting 208 } // namespace remoting
209 209
210 #endif // REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ 210 #endif // REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698