| Index: chrome/browser/resources/print_preview/search/destination_search.js
|
| diff --git a/chrome/browser/resources/print_preview/search/destination_search.js b/chrome/browser/resources/print_preview/search/destination_search.js
|
| index cc59b37ebf07538fe18838f8b5858be29346c12e..7e431ab39a7a33475ab903d5bae0b9b698666a8b 100644
|
| --- a/chrome/browser/resources/print_preview/search/destination_search.js
|
| +++ b/chrome/browser/resources/print_preview/search/destination_search.js
|
| @@ -87,7 +87,8 @@ cr.define('print_preview', function() {
|
| * @type {!print_preview.DestinationList}
|
| * @private
|
| */
|
| - this.recentList_ = new print_preview.RecentDestinationList(this);
|
| + this.recentList_ =
|
| + new print_preview.RecentDestinationList(this, this.destinationStore_);
|
| this.addChild(this.recentList_);
|
|
|
| /**
|
| @@ -97,6 +98,7 @@ cr.define('print_preview', function() {
|
| */
|
| this.localList_ = new print_preview.DestinationList(
|
| this,
|
| + this.destinationStore_,
|
| loadTimeData.getString('localDestinationsTitle'),
|
| loadTimeData.getBoolean('showLocalManageButton') ?
|
| loadTimeData.getString('manage') : null);
|
| @@ -107,7 +109,8 @@ cr.define('print_preview', function() {
|
| * @type {!print_preview.DestinationList}
|
| * @private
|
| */
|
| - this.cloudList_ = new print_preview.CloudDestinationList(this);
|
| + this.cloudList_ =
|
| + new print_preview.CloudDestinationList(this, this.destinationStore_);
|
| this.addChild(this.cloudList_);
|
| };
|
|
|
| @@ -583,35 +586,6 @@ cr.define('print_preview', function() {
|
| * @private
|
| */
|
| handleOnDestinationSelect_: function(destination) {
|
| - if (destination.origin == print_preview.Destination.Origin.CROS &&
|
| - !destination.capabilities) {
|
| - // local printers on CrOS require setup.
|
| - assert(!this.printerConfigurer_);
|
| - this.printerConfigurer_ = new print_preview.CrosDestinationResolver(
|
| - this.destinationStore_, destination);
|
| - this.addChild(this.printerConfigurer_);
|
| - this.printerConfigurer_.run(this.getElement()).
|
| - then(
|
| - /**
|
| - * @param {!print_preview.PrinterSetupResponse} result
|
| - * An object containing the printerId and capabilities.
|
| - */
|
| - function(result) {
|
| - assert(result.printerId == destination.id);
|
| - destination.capabilities = result.capabilities;
|
| - this.handleOnDestinationSelect_(destination);
|
| - }.bind(this),
|
| - function() {
|
| - console.warn(
|
| - 'Failed to setup destination: ' + destination.id);
|
| - }).
|
| - then(function() {
|
| - this.removeChild(this.printerConfigurer_);
|
| - this.printerConfigurer_ = null;
|
| - }.bind(this));
|
| - return;
|
| - }
|
| -
|
| if (destination.isProvisional) {
|
| assert(!this.provisionalDestinationResolver_,
|
| 'Provisional destination resolver already exists.');
|
|
|