OLD | NEW |
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 /** |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 var error = base.getHtmlElement('paired-client-manager-dialog-error'); | 76 var error = base.getHtmlElement('paired-client-manager-dialog-error'); |
77 var noPairedClients = base.getHtmlElement('no-paired-clients'); | 77 var noPairedClients = base.getHtmlElement('no-paired-clients'); |
78 remoting.pairedClientManager = | 78 remoting.pairedClientManager = |
79 new remoting.PairedClientManager(remoting.hostController, dialog, message, | 79 new remoting.PairedClientManager(remoting.hostController, dialog, message, |
80 deleteAll, close, noPairedClients, | 80 deleteAll, close, noPairedClients, |
81 working, error); | 81 working, error); |
82 // Display the cached host list, then asynchronously update and re-display it. | 82 // Display the cached host list, then asynchronously update and re-display it. |
83 remoting.updateLocalHostState(); | 83 remoting.updateLocalHostState(); |
84 remoting.hostList.refresh().then(remoting.updateLocalHostState); | 84 remoting.hostList.refresh().then(remoting.updateLocalHostState); |
85 | 85 |
86 // Butter bar is temporarily disabled. crbug.com/714244 | 86 remoting.butterBar = new remoting.ButterBar(); |
87 // remoting.butterBar = new remoting.ButterBar(); | 87 remoting.butterBar.init(); |
88 }; | 88 }; |
89 | 89 |
90 /** | 90 /** |
91 * Fetches local host state and updates the DOM accordingly. | 91 * Fetches local host state and updates the DOM accordingly. |
92 */ | 92 */ |
93 remoting.updateLocalHostState = function() { | 93 remoting.updateLocalHostState = function() { |
94 /** | 94 /** |
95 * @param {remoting.HostController.State} state Host state. | 95 * @param {remoting.HostController.State} state Host state. |
96 */ | 96 */ |
97 var onHostState = function(state) { | 97 var onHostState = function(state) { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 178 } |
179 }; | 179 }; |
180 | 180 |
181 | 181 |
182 remoting.startDesktopRemoting = function() { | 182 remoting.startDesktopRemoting = function() { |
183 remoting.app = new remoting.DesktopRemoting(); | 183 remoting.app = new remoting.DesktopRemoting(); |
184 remoting.app.start(); | 184 remoting.app.start(); |
185 }; | 185 }; |
186 | 186 |
187 window.addEventListener('load', remoting.startDesktopRemotingForTesting, false); | 187 window.addEventListener('load', remoting.startDesktopRemotingForTesting, false); |
OLD | NEW |