| 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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 }); | 634 }); |
| 635 | 635 |
| 636 [].forEach.call( | 636 [].forEach.call( |
| 637 document.querySelectorAll('.confirm-code'), function(button) { | 637 document.querySelectorAll('.confirm-code'), function(button) { |
| 638 button.addEventListener('click', confirmCode); | 638 button.addEventListener('click', confirmCode); |
| 639 }); | 639 }); |
| 640 | 640 |
| 641 $('register-error-exit').addEventListener('click', cancelRegistration); | 641 $('register-error-exit').addEventListener('click', cancelRegistration); |
| 642 | 642 |
| 643 | 643 |
| 644 $('cloud-devices-retry-button').addEventListener('click', | 644 $('cloud-devices-retry-link').addEventListener('click', |
| 645 retryLoadCloudDevices); | 645 retryLoadCloudDevices); |
| 646 | 646 |
| 647 $('cloud-devices-login-button').addEventListener( | 647 $('cloud-devices-login-link').addEventListener( |
| 648 'click', | 648 'click', |
| 649 cloudDevicesLoginButtonClicked); | 649 cloudDevicesLoginButtonClicked); |
| 650 | 650 |
| 651 $('register-login-button').addEventListener( | 651 $('register-login-link').addEventListener( |
| 652 'click', | 652 'click', |
| 653 registerLoginButtonClicked); | 653 registerLoginButtonClicked); |
| 654 | 654 |
| 655 $('register-overlay-login-button').addEventListener( | 655 $('register-overlay-login-button').addEventListener( |
| 656 'click', | 656 'click', |
| 657 registerOverlayLoginButtonClicked); | 657 registerOverlayLoginButtonClicked); |
| 658 | 658 |
| 659 if (loadTimeData.valueExists('backButtonURL')) { | 659 if (loadTimeData.valueExists('backButtonURL')) { |
| 660 $('back-button').hidden = false; | 660 $('back-link').hidden = false; |
| 661 $('back-button').addEventListener('click', function() { | 661 $('back-link').addEventListener('click', function() { |
| 662 window.location.href = loadTimeData.getString('backButtonURL'); | 662 window.location.href = loadTimeData.getString('backButtonURL'); |
| 663 }); | 663 }); |
| 664 } | 664 } |
| 665 | 665 |
| 666 updateVisibility(); | 666 updateVisibility(); |
| 667 document.addEventListener('visibilitychange', updateVisibility, false); | 667 document.addEventListener('visibilitychange', updateVisibility, false); |
| 668 | 668 |
| 669 focusManager = new LocalDiscoveryFocusManager(); | 669 focusManager = new LocalDiscoveryFocusManager(); |
| 670 focusManager.initialize(); | 670 focusManager.initialize(); |
| 671 | 671 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 682 onCloudDeviceListAvailable: onCloudDeviceListAvailable, | 682 onCloudDeviceListAvailable: onCloudDeviceListAvailable, |
| 683 onCloudDeviceListUnavailable: onCloudDeviceListUnavailable, | 683 onCloudDeviceListUnavailable: onCloudDeviceListUnavailable, |
| 684 onDeviceCacheFlushed: onDeviceCacheFlushed, | 684 onDeviceCacheFlushed: onDeviceCacheFlushed, |
| 685 onRegistrationCanceledPrinter: onRegistrationCanceledPrinter, | 685 onRegistrationCanceledPrinter: onRegistrationCanceledPrinter, |
| 686 onRegistrationTimeout: onRegistrationTimeout, | 686 onRegistrationTimeout: onRegistrationTimeout, |
| 687 setUserLoggedIn: setUserLoggedIn, | 687 setUserLoggedIn: setUserLoggedIn, |
| 688 setupCloudPrintConnectorSection: setupCloudPrintConnectorSection, | 688 setupCloudPrintConnectorSection: setupCloudPrintConnectorSection, |
| 689 removeCloudPrintConnectorSection: removeCloudPrintConnectorSection | 689 removeCloudPrintConnectorSection: removeCloudPrintConnectorSection |
| 690 }; | 690 }; |
| 691 }); | 691 }); |
| OLD | NEW |