Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: chrome/browser/resources/print_preview/native_layer.js

Issue 2848093002: Process null capabilities as a capability fetch failure. (Closed)
Patch Set: address comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.exportPath('print_preview'); 5 cr.exportPath('print_preview');
6 6
7 /** 7 /**
8 * @typedef {{selectSaveAsPdfDestination: boolean, 8 * @typedef {{selectSaveAsPdfDestination: boolean,
9 * layoutSettings.portrait: boolean, 9 * layoutSettings.portrait: boolean,
10 * pageRange: string, 10 * pageRange: string,
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 this.dispatchEvent(localDestsSetEvent); 543 this.dispatchEvent(localDestsSetEvent);
544 }, 544 },
545 545
546 /** 546 /**
547 * Called when native layer gets settings information for a requested local 547 * Called when native layer gets settings information for a requested local
548 * destination. 548 * destination.
549 * @param {Object} settingsInfo printer setting information. 549 * @param {Object} settingsInfo printer setting information.
550 * @private 550 * @private
551 */ 551 */
552 onUpdateWithPrinterCapabilities_: function(settingsInfo) { 552 onUpdateWithPrinterCapabilities_: function(settingsInfo) {
553 assert(settingsInfo.capabilities,
554 'Capabilities update without capabilites');
553 var capsSetEvent = new Event(NativeLayer.EventType.CAPABILITIES_SET); 555 var capsSetEvent = new Event(NativeLayer.EventType.CAPABILITIES_SET);
554 capsSetEvent.settingsInfo = settingsInfo; 556 capsSetEvent.settingsInfo = settingsInfo;
555 this.dispatchEvent(capsSetEvent); 557 this.dispatchEvent(capsSetEvent);
556 }, 558 },
557 559
558 /** 560 /**
559 * Called when native layer gets settings information for a requested local 561 * Called when native layer gets settings information for a requested local
560 * destination. 562 * destination.
561 * @param {string} destinationId Printer affected by error. 563 * @param {string} destinationId Printer affected by error.
562 * @private 564 * @private
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 return this.serializedDefaultDestinationSelectionRulesStr_; 1106 return this.serializedDefaultDestinationSelectionRulesStr_;
1105 } 1107 }
1106 }; 1108 };
1107 1109
1108 // Export 1110 // Export
1109 return { 1111 return {
1110 NativeInitialSettings: NativeInitialSettings, 1112 NativeInitialSettings: NativeInitialSettings,
1111 NativeLayer: NativeLayer 1113 NativeLayer: NativeLayer
1112 }; 1114 };
1113 }); 1115 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698