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

Unified Diff: chrome/browser/resources/print_preview/print_preview.js

Issue 2962983002: Print Preview: change getPreview to cr.sendWithPromise (Closed)
Patch Set: Fix check Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/print_preview.js
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index 8e915cc5e019a7262c524e0b4e4835f8e8a9e260..c60a4398a9eda8634dd4965a2dfc003aa32385df 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -348,10 +348,6 @@ cr.define('print_preview', function() {
enterDocument: function() {
// Native layer events.
var nativeLayerEventTarget = this.nativeLayer_.getEventTarget();
- this.tracker.add(
- nativeLayerEventTarget,
- print_preview.NativeLayer.EventType.SETTINGS_INVALID,
- this.onSettingsInvalid_.bind(this));
this.tracker.add(
nativeLayerEventTarget,
print_preview.NativeLayer.EventType.PRINT_PRESET_OPTIONS,
@@ -392,6 +388,10 @@ cr.define('print_preview', function() {
this.previewArea_,
print_preview.PreviewArea.EventType.OPEN_SYSTEM_DIALOG_CLICK,
this.openSystemPrintDialog_.bind(this));
+ this.tracker.add(
+ this.previewArea_,
+ print_preview.PreviewArea.EventType.SETTINGS_INVALID,
+ this.onSettingsInvalid_.bind(this));
this.tracker.add(
this.destinationStore_,
@@ -955,9 +955,6 @@ cr.define('print_preview', function() {
this.uiState_ = PrintPreviewUiState_.ERROR;
this.isPreviewGenerationInProgress_ = false;
this.printHeader_.isPrintButtonEnabled = false;
- this.previewArea_.cancelTimeout();
- this.previewArea_.showCustomMessage(
- loadTimeData.getString('invalidPrinterSettings'));
},
/**

Powered by Google App Engine
This is Rietveld 408576698