| Index: chrome/browser/resources/print_preview/search/provisional_destination_resolver.js
|
| diff --git a/chrome/browser/resources/print_preview/search/provisional_destination_resolver.js b/chrome/browser/resources/print_preview/search/provisional_destination_resolver.js
|
| index b16e474efd91fb0b7a8d17490f81b512872ccfc3..d947b7c74e8a5ddf727d8ac775ddd245206cbd1b 100644
|
| --- a/chrome/browser/resources/print_preview/search/provisional_destination_resolver.js
|
| +++ b/chrome/browser/resources/print_preview/search/provisional_destination_resolver.js
|
| @@ -55,7 +55,7 @@ cr.define('print_preview', function() {
|
| */
|
| ProvisionalDestinationResolver.create = function(store, destination) {
|
| if (destination.provisionalType !=
|
| - print_preview.Destination.ProvisionalType.NEEDS_USB_PERMISSION) {
|
| + print_preview.Destination.ProvisionalType.NEEDS_USB_PERMISSION) {
|
| return null;
|
| }
|
| return new ProvisionalDestinationResolver(store, destination);
|
| @@ -69,26 +69,23 @@ cr.define('print_preview', function() {
|
| print_preview.Overlay.prototype.enterDocument.call(this);
|
|
|
| this.tracker.add(
|
| - this.getChildElement('.usb-permission-ok-button'),
|
| - 'click',
|
| + this.getChildElement('.usb-permission-ok-button'), 'click',
|
| this.startResolveDestination_.bind(this));
|
| this.tracker.add(
|
| - this.getChildElement('.cancel'),
|
| - 'click',
|
| - this.cancel.bind(this));
|
| + this.getChildElement('.cancel'), 'click', this.cancel.bind(this));
|
|
|
| this.tracker.add(
|
| - this.destinationStore_,
|
| - print_preview.DestinationStore.EventType
|
| - .PROVISIONAL_DESTINATION_RESOLVED,
|
| + this.destinationStore_, print_preview.DestinationStore.EventType
|
| + .PROVISIONAL_DESTINATION_RESOLVED,
|
| this.onDestinationResolved_.bind(this));
|
| },
|
|
|
| /** @override */
|
| onSetVisibleInternal: function(visible) {
|
| if (visible) {
|
| - assert(this.state_ == ResolverState.INITIAL,
|
| - 'Showing overlay while not in initial state.');
|
| + assert(
|
| + this.state_ == ResolverState.INITIAL,
|
| + 'Showing overlay while not in initial state.');
|
| assert(!this.promiseResolver_, 'Promise resolver already set.');
|
| this.setState_(ResolverState.ACTIVE);
|
| this.promiseResolver_ = new PromiseResolver();
|
| @@ -103,8 +100,8 @@ cr.define('print_preview', function() {
|
|
|
| /** @override */
|
| createDom: function() {
|
| - this.setElementInternal(this.cloneTemplateInternal(
|
| - 'extension-usb-resolver'));
|
| + this.setElementInternal(
|
| + this.cloneTemplateInternal('extension-usb-resolver'));
|
|
|
| var extNameEl = this.getChildElement('.usb-permission-extension-name');
|
| extNameEl.title = this.destination_.extensionName;
|
| @@ -112,10 +109,10 @@ cr.define('print_preview', function() {
|
|
|
| var extIconEl = this.getChildElement('.usb-permission-extension-icon');
|
| extIconEl.style.backgroundImage = '-webkit-image-set(' +
|
| - 'url(chrome://extension-icon/' +
|
| - this.destination_.extensionId + '/24/1) 1x,' +
|
| - 'url(chrome://extension-icon/' +
|
| - this.destination_.extensionId + '/48/1) 2x)';
|
| + 'url(chrome://extension-icon/' + this.destination_.extensionId +
|
| + '/24/1) 1x,' +
|
| + 'url(chrome://extension-icon/' + this.destination_.extensionId +
|
| + '/48/1) 2x)';
|
| },
|
|
|
| /**
|
| @@ -123,8 +120,9 @@ cr.define('print_preview', function() {
|
| * @private
|
| */
|
| startResolveDestination_: function() {
|
| - assert(this.state_ == ResolverState.ACTIVE,
|
| - 'Invalid state in request grant permission');
|
| + assert(
|
| + this.state_ == ResolverState.ACTIVE,
|
| + 'Invalid state in request grant permission');
|
|
|
| this.setState_(ResolverState.GRANTING_PERMISSION);
|
| this.destinationStore_.resolveProvisionalDestination(this.destination_);
|
| @@ -181,18 +179,19 @@ cr.define('print_preview', function() {
|
| if (this.state_ != ResolverState.ACTIVE)
|
| this.getChildElement('.cancel').focus();
|
|
|
| - this.getChildElement('.throbber-placeholder').classList.toggle(
|
| - 'throbber',
|
| - this.state_ == ResolverState.GRANTING_PERMISSION);
|
| + this.getChildElement('.throbber-placeholder')
|
| + .classList.toggle(
|
| + 'throbber', this.state_ == ResolverState.GRANTING_PERMISSION);
|
|
|
| this.getChildElement('.usb-permission-extension-desc').hidden =
|
| this.state_ == ResolverState.ERROR;
|
|
|
| this.getChildElement('.usb-permission-message').textContent =
|
| this.state_ == ResolverState.ERROR ?
|
| - loadTimeData.getStringF('resolveExtensionUSBErrorMessage',
|
| - this.destination_.extensionName) :
|
| - loadTimeData.getString('resolveExtensionUSBPermissionMessage');
|
| + loadTimeData.getStringF(
|
| + 'resolveExtensionUSBErrorMessage',
|
| + this.destination_.extensionName) :
|
| + loadTimeData.getString('resolveExtensionUSBPermissionMessage');
|
| },
|
|
|
| /**
|
| @@ -211,7 +210,5 @@ cr.define('print_preview', function() {
|
| }
|
| };
|
|
|
| - return {
|
| - ProvisionalDestinationResolver: ProvisionalDestinationResolver
|
| - };
|
| + return {ProvisionalDestinationResolver: ProvisionalDestinationResolver};
|
| });
|
|
|