| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 /** | 5 /** |
| 6 * Javascript for local_discovery.html, served from chrome://devices/ | 6 * Javascript for local_discovery.html, served from chrome://devices/ |
| 7 * This is used to show discoverable devices near the user as well as | 7 * This is used to show discoverable devices near the user as well as |
| 8 * cloud devices registered to them. | 8 * cloud devices registered to them. |
| 9 * | 9 * |
| 10 * The object defined in this javascript file listens for callbacks from the | 10 * The object defined in this javascript file listens for callbacks from the |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 var devicesDomElement = document.createElement('div'); | 328 var devicesDomElement = document.createElement('div'); |
| 329 | 329 |
| 330 var description; | 330 var description; |
| 331 if (device.description == '') { | 331 if (device.description == '') { |
| 332 description = loadTimeData.getString('noDescription'); | 332 description = loadTimeData.getString('noDescription'); |
| 333 } else { | 333 } else { |
| 334 description = device.description; | 334 description = device.description; |
| 335 } | 335 } |
| 336 | 336 |
| 337 fillDeviceDescription(devicesDomElement, device.display_name, | 337 fillDeviceDescription(devicesDomElement, device.display_name, |
| 338 description, device.type, 'Manage' /*Localize*/, | 338 description, device.type, |
| 339 loadTimeData.getString('manageDevice'), |
| 339 manageCloudDevice.bind(null, device.id)); | 340 manageCloudDevice.bind(null, device.id)); |
| 340 return devicesDomElement; | 341 return devicesDomElement; |
| 341 } | 342 } |
| 342 | 343 |
| 343 /** | 344 /** |
| 344 * Handle a list of cloud devices available to the user globally. | 345 * Handle a list of cloud devices available to the user globally. |
| 345 * @param {Array.<Object>} devices_list List of devices. | 346 * @param {Array.<Object>} devices_list List of devices. |
| 346 */ | 347 */ |
| 347 function onCloudDeviceListAvailable(devices_list) { | 348 function onCloudDeviceListAvailable(devices_list) { |
| 348 var devicesListLength = devices_list.length; | 349 var devicesListLength = devices_list.length; |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 onCloudDeviceListAvailable: onCloudDeviceListAvailable, | 620 onCloudDeviceListAvailable: onCloudDeviceListAvailable, |
| 620 onCloudDeviceListUnavailable: onCloudDeviceListUnavailable, | 621 onCloudDeviceListUnavailable: onCloudDeviceListUnavailable, |
| 621 onDeviceCacheFlushed: onDeviceCacheFlushed, | 622 onDeviceCacheFlushed: onDeviceCacheFlushed, |
| 622 onRegistrationCanceledPrinter: onRegistrationCanceledPrinter, | 623 onRegistrationCanceledPrinter: onRegistrationCanceledPrinter, |
| 623 onRegistrationTimeout: onRegistrationTimeout, | 624 onRegistrationTimeout: onRegistrationTimeout, |
| 624 setUserLoggedIn: setUserLoggedIn, | 625 setUserLoggedIn: setUserLoggedIn, |
| 625 setupCloudPrintConnectorSection: setupCloudPrintConnectorSection, | 626 setupCloudPrintConnectorSection: setupCloudPrintConnectorSection, |
| 626 removeCloudPrintConnectorSection: removeCloudPrintConnectorSection | 627 removeCloudPrintConnectorSection: removeCloudPrintConnectorSection |
| 627 }; | 628 }; |
| 628 }); | 629 }); |
| OLD | NEW |