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

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

Issue 2047613002: [Remoting Android] Move pairing secret fetcher to the network thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback Created 4 years, 6 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 | « no previous file | 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 <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // ClipboardStub implementation. 129 // ClipboardStub implementation.
130 void SetCursorShape(const protocol::CursorShapeInfo& shape) override; 130 void SetCursorShape(const protocol::CursorShapeInfo& shape) override;
131 131
132 // Get the weak pointer of the instance. Please only use it on the network 132 // Get the weak pointer of the instance. Please only use it on the network
133 // thread. 133 // thread.
134 base::WeakPtr<ChromotingJniInstance> GetWeakPtr(); 134 base::WeakPtr<ChromotingJniInstance> GetWeakPtr();
135 135
136 private: 136 private:
137 void ConnectToHostOnNetworkThread(); 137 void ConnectToHostOnNetworkThread();
138 138
139 // Notifies the user interface that the user needs to enter a PIN. The
140 // current authentication attempt is put on hold until |callback| is invoked.
141 // May be called on any thread.
142 void FetchSecret(bool pairable,
143 const protocol::SecretFetchedCallback& callback);
144
145 // Sets the device name. Can be called on any thread. 139 // Sets the device name. Can be called on any thread.
146 void SetDeviceName(const std::string& device_name); 140 void SetDeviceName(const std::string& device_name);
147 141
148 void SendKeyEventInternal(int usb_key_code, bool key_down); 142 void SendKeyEventInternal(int usb_key_code, bool key_down);
149 143
150 // Enables or disables periodic logging of performance statistics. Called on 144 // Enables or disables periodic logging of performance statistics. Called on
151 // the network thread. 145 // the network thread.
152 void EnableStatsLogging(bool enabled); 146 void EnableStatsLogging(bool enabled);
153 147
154 // If logging is enabled, logs the current connection statistics, and 148 // If logging is enabled, logs the current connection statistics, and
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool connected_ = false; 203 bool connected_ = false;
210 204
211 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; 205 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_;
212 206
213 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); 207 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance);
214 }; 208 };
215 209
216 } // namespace remoting 210 } // namespace remoting
217 211
218 #endif 212 #endif
OLDNEW
« no previous file with comments | « no previous file | remoting/client/jni/chromoting_jni_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698