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

Side by Side Diff: remoting/client/plugin/chromoting_instance.h

Issue 15685008: Show a 'remember me' checkbox in the web-app when connecting to a host that supports pairing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/client/plugin/chromoting_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // TODO(ajwong): We need to come up with a better description of the 5 // TODO(ajwong): We need to come up with a better description of the
6 // responsibilities for each thread. 6 // responsibilities for each thread.
7 7
8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 const std::string& scope, 169 const std::string& scope,
170 const base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher); 170 const base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher);
171 171
172 private: 172 private:
173 FRIEND_TEST_ALL_PREFIXES(ChromotingInstanceTest, TestCaseSetup); 173 FRIEND_TEST_ALL_PREFIXES(ChromotingInstanceTest, TestCaseSetup);
174 174
175 // Used as the |FetchSecretCallback| for IT2Me (or Me2Me from old webapps). 175 // Used as the |FetchSecretCallback| for IT2Me (or Me2Me from old webapps).
176 // Immediately calls |secret_fetched_callback| with |shared_secret|. 176 // Immediately calls |secret_fetched_callback| with |shared_secret|.
177 static void FetchSecretFromString( 177 static void FetchSecretFromString(
178 const std::string& shared_secret, 178 const std::string& shared_secret,
179 bool pairing_supported,
179 const protocol::SecretFetchedCallback& secret_fetched_callback); 180 const protocol::SecretFetchedCallback& secret_fetched_callback);
180 181
181 // Message handlers for messages that come from JavaScript. Called 182 // Message handlers for messages that come from JavaScript. Called
182 // from HandleMessage(). 183 // from HandleMessage().
183 void Connect(const ClientConfig& config); 184 void Connect(const ClientConfig& config);
184 void Disconnect(); 185 void Disconnect();
185 void OnIncomingIq(const std::string& iq); 186 void OnIncomingIq(const std::string& iq);
186 void ReleaseAllKeys(); 187 void ReleaseAllKeys();
187 void InjectKeyEvent(const protocol::KeyEvent& event); 188 void InjectKeyEvent(const protocol::KeyEvent& event);
188 void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode); 189 void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode);
(...skipping 22 matching lines...) Expand all
211 212
212 // Returns true if the hosting content has the chrome-extension:// scheme. 213 // Returns true if the hosting content has the chrome-extension:// scheme.
213 bool IsCallerAppOrExtension(); 214 bool IsCallerAppOrExtension();
214 215
215 // Returns true if there is a ConnectionToHost and it is connected. 216 // Returns true if there is a ConnectionToHost and it is connected.
216 bool IsConnected(); 217 bool IsConnected();
217 218
218 // Used as the |FetchSecretCallback| for Me2Me connections. 219 // Used as the |FetchSecretCallback| for Me2Me connections.
219 // Uses the PIN request dialog in the webapp to obtain the shared secret. 220 // Uses the PIN request dialog in the webapp to obtain the shared secret.
220 void FetchSecretFromDialog( 221 void FetchSecretFromDialog(
222 bool pairing_supported,
221 const protocol::SecretFetchedCallback& secret_fetched_callback); 223 const protocol::SecretFetchedCallback& secret_fetched_callback);
222 224
223 bool initialized_; 225 bool initialized_;
224 226
225 PepperPluginThreadDelegate plugin_thread_delegate_; 227 PepperPluginThreadDelegate plugin_thread_delegate_;
226 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; 228 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_;
227 ClientContext context_; 229 ClientContext context_;
228 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; 230 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_;
229 scoped_ptr<PepperView> view_; 231 scoped_ptr<PepperView> view_;
230 pp::View plugin_view_; 232 pp::View plugin_view_;
(...skipping 23 matching lines...) Expand all
254 base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher_; 256 base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher_;
255 257
256 base::WeakPtrFactory<ChromotingInstance> weak_factory_; 258 base::WeakPtrFactory<ChromotingInstance> weak_factory_;
257 259
258 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); 260 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
259 }; 261 };
260 262
261 } // namespace remoting 263 } // namespace remoting
262 264
263 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 265 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698