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

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

Issue 1020743002: [Chromoting] Move app-specific code out of remoting.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 10 /**
11 * Initialize the host list. 11 * Initialize the host list.
12 */ 12 */
13 remoting.initHostlist_ = function() { 13 remoting.initHostlist_ = function() {
14 remoting.hostController = new remoting.HostController(); 14 remoting.hostController = new remoting.HostController();
15 remoting.hostList = new remoting.HostList( 15 remoting.hostList = new remoting.HostList(
16 document.getElementById('host-list'), 16 document.getElementById('host-list'),
17 document.getElementById('host-list-empty'), 17 document.getElementById('host-list-empty'),
18 document.getElementById('host-list-error-message'), 18 document.getElementById('host-list-error-message'),
19 document.getElementById('host-list-refresh-failed-button'), 19 document.getElementById('host-list-refresh-failed-button'),
20 document.getElementById('host-list-loading-indicator')); 20 document.getElementById('host-list-loading-indicator'),
21 remoting.app.onAuthError.bind(remoting.app));
kelvinp 2015/03/19 17:50:20 This is a bit misleading as the error that the hos
garykac 2015/03/19 21:58:38 Done.
21 22
22 isHostModeSupported_().then( 23 isHostModeSupported_().then(
23 /** @param {Boolean} supported */ 24 /** @param {Boolean} supported */
24 function(supported) { 25 function(supported) {
25 if (supported) { 26 if (supported) {
26 var noShare = document.getElementById('unsupported-platform-message'); 27 var noShare = document.getElementById('unsupported-platform-message');
27 noShare.parentNode.removeChild(noShare); 28 noShare.parentNode.removeChild(noShare);
28 } else { 29 } else {
29 var button = document.getElementById('share-button'); 30 var button = document.getElementById('share-button');
30 button.disabled = true; 31 button.disabled = true;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 182 }
182 183
183 184
184 remoting.startDesktopRemoting = function() { 185 remoting.startDesktopRemoting = function() {
185 remoting.app = new remoting.Application(remoting.app_capabilities()); 186 remoting.app = new remoting.Application(remoting.app_capabilities());
186 var desktop_remoting = new remoting.DesktopRemoting(remoting.app); 187 var desktop_remoting = new remoting.DesktopRemoting(remoting.app);
187 remoting.app.start(); 188 remoting.app.start();
188 }; 189 };
189 190
190 window.addEventListener('load', remoting.startDesktopRemotingForTesting, false); 191 window.addEventListener('load', remoting.startDesktopRemotingForTesting, false);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698