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

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

Issue 10703034: Remove 'Enable' button on unsupported platforms. Added 'No hosts' message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 8 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 | Annotate | Revision Log
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 21 matching lines...) Expand all
32 remoting.init = function() { 32 remoting.init = function() {
33 remoting.logExtensionInfoAsync_(); 33 remoting.logExtensionInfoAsync_();
34 l10n.localize(); 34 l10n.localize();
35 // Create global objects. 35 // Create global objects.
36 remoting.oauth2 = new remoting.OAuth2(); 36 remoting.oauth2 = new remoting.OAuth2();
37 remoting.stats = new remoting.ConnectionStats( 37 remoting.stats = new remoting.ConnectionStats(
38 document.getElementById('statistics')); 38 document.getElementById('statistics'));
39 remoting.formatIq = new remoting.FormatIq(); 39 remoting.formatIq = new remoting.FormatIq();
40 remoting.hostList = new remoting.HostList( 40 remoting.hostList = new remoting.HostList(
41 document.getElementById('host-list'), 41 document.getElementById('host-list'),
42 document.getElementById('host-list-empty'),
42 document.getElementById('host-list-error-message'), 43 document.getElementById('host-list-error-message'),
43 document.getElementById('host-list-refresh-failed-button')); 44 document.getElementById('host-list-refresh-failed-button'));
44 remoting.toolbar = new remoting.Toolbar( 45 remoting.toolbar = new remoting.Toolbar(
45 document.getElementById('session-toolbar')); 46 document.getElementById('session-toolbar'));
46 remoting.clipboard = new remoting.Clipboard(); 47 remoting.clipboard = new remoting.Clipboard();
47 48
48 refreshEmail_(); 49 refreshEmail_();
49 var email = remoting.oauth2.getCachedEmail(); 50 var email = remoting.oauth2.getCachedEmail();
50 if (email) { 51 if (email) {
51 document.getElementById('current-email').innerText = email; 52 document.getElementById('current-email').innerText = email;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 */ 334 */
334 remoting.defaultOAuthErrorHandler = function(error) { 335 remoting.defaultOAuthErrorHandler = function(error) {
335 l10n.localizeElementFromTag( 336 l10n.localizeElementFromTag(
336 document.getElementById('token-refresh-error-message'), 337 document.getElementById('token-refresh-error-message'),
337 error); 338 error);
338 var auth_failed = (error == remoting.Error.AUTHENTICATION_FAILED); 339 var auth_failed = (error == remoting.Error.AUTHENTICATION_FAILED);
339 document.getElementById('token-refresh-auth-failed').hidden = !auth_failed; 340 document.getElementById('token-refresh-auth-failed').hidden = !auth_failed;
340 document.getElementById('token-refresh-other-error').hidden = auth_failed; 341 document.getElementById('token-refresh-other-error').hidden = auth_failed;
341 remoting.setMode(remoting.AppMode.TOKEN_REFRESH_FAILED); 342 remoting.setMode(remoting.AppMode.TOKEN_REFRESH_FAILED);
342 }; 343 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698