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

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

Issue 8568038: Create HostList class to facilitate future work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 19 matching lines...) Expand all
30 */ 30 */
31 remoting.init = function() { 31 remoting.init = function() {
32 l10n.localize(); 32 l10n.localize();
33 var button = document.getElementById('toggle-scaling'); 33 var button = document.getElementById('toggle-scaling');
34 button.title = chrome.i18n.getMessage(/*i18n-content*/'TOOLTIP_SCALING'); 34 button.title = chrome.i18n.getMessage(/*i18n-content*/'TOOLTIP_SCALING');
35 // Create global objects. 35 // Create global objects.
36 remoting.oauth2 = new remoting.OAuth2(); 36 remoting.oauth2 = new remoting.OAuth2();
37 remoting.debug = new remoting.DebugLog( 37 remoting.debug = new remoting.DebugLog(
38 document.getElementById('debug-messages'), 38 document.getElementById('debug-messages'),
39 document.getElementById('statistics')); 39 document.getElementById('statistics'));
40 remoting.hostList = new remoting.HostList(
41 document.getElementById('host-list'),
42 document.getElementById('host-list-error'));
40 43
41 refreshEmail_(); 44 refreshEmail_();
42 var email = remoting.oauth2.getCachedEmail(); 45 var email = remoting.oauth2.getCachedEmail();
43 if (email) { 46 if (email) {
44 document.getElementById('current-email').innerText = email; 47 document.getElementById('current-email').innerText = email;
45 } 48 }
46 49
47 remoting.setMode(getAppStartupMode_()); 50 remoting.setMode(getAppStartupMode_());
48 if (isHostModeSupported_()) { 51 if (isHostModeSupported_()) {
49 var noShare = document.getElementById('chrome-os-no-share'); 52 var noShare = document.getElementById('chrome-os-no-share');
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 /** 159 /**
157 * Returns whether Host mode is supported on this platform. 160 * Returns whether Host mode is supported on this platform.
158 * 161 *
159 * @return {boolean} True if Host mode is supported. 162 * @return {boolean} True if Host mode is supported.
160 */ 163 */
161 function isHostModeSupported_() { 164 function isHostModeSupported_() {
162 // Currently, sharing on Chromebooks is not supported. 165 // Currently, sharing on Chromebooks is not supported.
163 return !navigator.userAgent.match(/\bCrOS\b/); 166 return !navigator.userAgent.match(/\bCrOS\b/);
164 } 167 }
165 }()); 168 }());
OLDNEW
« remoting/webapp/me2mom/home_screen.js ('K') | « remoting/webapp/me2mom/host_list.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698