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

Side by Side Diff: remoting/webapp/remoting.js

Issue 232223003: Windows chromoting host installation via the NPAPI plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests Created 6 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/webapp/js_proto/remoting_proto.js ('k') | no next file » | 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 'use strict'; 5 'use strict';
6 6
7 /** @suppress {duplicate} */ 7 /** @suppress {duplicate} */
8 var remoting = remoting || {}; 8 var remoting = remoting || {};
9 9
10 /** @type {remoting.HostSession} */ remoting.hostSession = null; 10 /** @type {remoting.HostSession} */ remoting.hostSession = null;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 * Returns true if the current platform is fully supported. It's only used when 178 * Returns true if the current platform is fully supported. It's only used when
179 * we detect that host native messaging components are not installed. In that 179 * we detect that host native messaging components are not installed. In that
180 * case the result of this function determines if the webapp should show the 180 * case the result of this function determines if the webapp should show the
181 * controls that allow to install and enable Me2Me host. 181 * controls that allow to install and enable Me2Me host.
182 * 182 *
183 * @return {boolean} 183 * @return {boolean}
184 */ 184 */
185 remoting.isMe2MeInstallable = function() { 185 remoting.isMe2MeInstallable = function() {
186 /** @type {string} */ 186 /** @type {string} */
187 var platform = navigator.platform; 187 var platform = navigator.platform;
188 // Chromoting host is not installable on ChromeOS and any linux distro other 188 // The chromoting host is currently not installable on ChromeOS.
189 // than Ubuntu. 189 // For Linux, we have a install package for Ubuntu but not other distros.
190 // Since we cannot tell from javascript alone the Linux distro the client is
191 // on, we don't show the daemon-control UI for Linux unless the host is
192 // installed.
190 return platform == 'Win32' || platform == 'MacIntel'; 193 return platform == 'Win32' || platform == 'MacIntel';
191 } 194 }
192 195
193 /** 196 /**
194 * Display the user's email address and allow access to the rest of the app, 197 * Display the user's email address and allow access to the rest of the app,
195 * including parsing URL parameters. 198 * including parsing URL parameters.
196 * 199 *
197 * @param {string} email The user's email address. 200 * @param {string} email The user's email address.
198 * @return {void} Nothing. 201 * @return {void} Nothing.
199 */ 202 */
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 /** 502 /**
500 * Generate a nonce, to be used as an xsrf protection token. 503 * Generate a nonce, to be used as an xsrf protection token.
501 * 504 *
502 * @return {string} A URL-Safe Base64-encoded 128-bit random value. */ 505 * @return {string} A URL-Safe Base64-encoded 128-bit random value. */
503 remoting.generateXsrfToken = function() { 506 remoting.generateXsrfToken = function() {
504 var random = new Uint8Array(16); 507 var random = new Uint8Array(16);
505 window.crypto.getRandomValues(random); 508 window.crypto.getRandomValues(random);
506 var base64Token = window.btoa(String.fromCharCode.apply(null, random)); 509 var base64Token = window.btoa(String.fromCharCode.apply(null, random));
507 return base64Token.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, ''); 510 return base64Token.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
508 }; 511 };
OLDNEW
« no previous file with comments | « remoting/webapp/js_proto/remoting_proto.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698