| 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 }; | 600 }; |
| 601 } else { | 601 } else { |
| 602 $('cloudPrintConnectorSetupButton').onclick = function(event) { | 602 $('cloudPrintConnectorSetupButton').onclick = function(event) { |
| 603 chrome.send('disableCloudPrintConnector'); | 603 chrome.send('disableCloudPrintConnector'); |
| 604 requestDeviceList(); | 604 requestDeviceList(); |
| 605 }; | 605 }; |
| 606 } | 606 } |
| 607 } | 607 } |
| 608 } | 608 } |
| 609 | 609 |
| 610 function removeCloudPrintConnectorSection() { | |
| 611 if (!cr.isChromeOS) { | |
| 612 var connectorSectionElm = $('cloud-print-connector-section'); | |
| 613 if (connectorSectionElm) | |
| 614 connectorSectionElm.parentNode.removeChild(connectorSectionElm); | |
| 615 } | |
| 616 } | |
| 617 | |
| 618 function getOverlayIDFromPath() { | 610 function getOverlayIDFromPath() { |
| 619 if (document.location.pathname == '/register') { | 611 if (document.location.pathname == '/register') { |
| 620 var params = parseQueryParams(document.location); | 612 var params = parseQueryParams(document.location); |
| 621 return params['id'] || null; | 613 return params['id'] || null; |
| 622 } | 614 } |
| 623 } | 615 } |
| 624 | 616 |
| 625 /** | 617 /** |
| 626 * Returns true of device is printer. | 618 * Returns true of device is printer. |
| 627 * @param {string} type Type of printer. | 619 * @param {string} type Type of printer. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 onUnregisteredDeviceUpdate: onUnregisteredDeviceUpdate, | 678 onUnregisteredDeviceUpdate: onUnregisteredDeviceUpdate, |
| 687 onRegistrationConfirmedOnPrinter: onRegistrationConfirmedOnPrinter, | 679 onRegistrationConfirmedOnPrinter: onRegistrationConfirmedOnPrinter, |
| 688 onRegistrationConfirmDeviceCode: onRegistrationConfirmDeviceCode, | 680 onRegistrationConfirmDeviceCode: onRegistrationConfirmDeviceCode, |
| 689 onCloudDeviceListAvailable: onCloudDeviceListAvailable, | 681 onCloudDeviceListAvailable: onCloudDeviceListAvailable, |
| 690 onCloudDeviceListUnavailable: onCloudDeviceListUnavailable, | 682 onCloudDeviceListUnavailable: onCloudDeviceListUnavailable, |
| 691 onDeviceCacheFlushed: onDeviceCacheFlushed, | 683 onDeviceCacheFlushed: onDeviceCacheFlushed, |
| 692 onRegistrationCanceledPrinter: onRegistrationCanceledPrinter, | 684 onRegistrationCanceledPrinter: onRegistrationCanceledPrinter, |
| 693 onRegistrationTimeout: onRegistrationTimeout, | 685 onRegistrationTimeout: onRegistrationTimeout, |
| 694 setUserLoggedIn: setUserLoggedIn, | 686 setUserLoggedIn: setUserLoggedIn, |
| 695 setupCloudPrintConnectorSection: setupCloudPrintConnectorSection, | 687 setupCloudPrintConnectorSection: setupCloudPrintConnectorSection, |
| 696 removeCloudPrintConnectorSection: removeCloudPrintConnectorSection | |
| 697 }; | 688 }; |
| 698 }); | 689 }); |
| OLD | NEW |