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

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

Issue 575333002: Compile print_preview, part 2: reduce down to 260 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview
Patch Set: revert movement of enums: now handle in compiler pass Created 6 years, 3 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 d6de02f0163552b06a08194114b89985bb451158..8374d5da306ba4baa4172135a42464800cd227b4 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -181,11 +181,6 @@ cr.define('print_preview', function() {
this.printTicketStore_);
this.addChild(this.advancedSettings_);
- /**
- * Component representing more/less settings button.
- * @type {!print_preview.MoreSettings}
- * @private
- */
var settingsSections = [
this.destinationSettings_,
this.pageSettings_,
@@ -196,6 +191,11 @@ cr.define('print_preview', function() {
this.colorSettings_,
this.otherOptionsSettings_,
this.advancedOptionsSettings_];
+ /**
+ * Component representing more/less settings button.
+ * @type {!print_preview.MoreSettings}
+ * @private
+ */
this.moreSettings_ = new print_preview.MoreSettings(
this.destinationStore_, settingsSections);
this.addChild(this.moreSettings_);
@@ -349,11 +349,11 @@ cr.define('print_preview', function() {
this.onManipulateSettingsForTest_.bind(this));
this.tracker.add(
- $('system-dialog-link'),
+ getRequiredElement('system-dialog-link'),
'click',
this.openSystemPrintDialog_.bind(this));
this.tracker.add(
- $('cloud-print-dialog-link'),
+ getRequiredElement('cloud-print-dialog-link'),
'click',
this.onCloudPrintDialogLinkClick_.bind(this));
if ($('open-pdf-in-preview-link')) {
@@ -589,7 +589,7 @@ cr.define('print_preview', function() {
this.printDocumentOrOpenPdfPreview_(false /*isPdfPreview*/);
return;
}
- setIsVisible($('system-dialog-throbber'), true);
+ setIsVisible(getRequiredElement('system-dialog-throbber'), true);
this.setIsEnabled_(false);
this.uiState_ = PrintPreview.UiState_.OPENING_NATIVE_PRINT_DIALOG;
this.nativeLayer_.startShowSystemDialog();
@@ -632,7 +632,8 @@ cr.define('print_preview', function() {
$('document-title').innerText = settings.documentTitle;
this.isSystemDialogAvailable_ = !settings.hidePrintWithSystemDialogLink &&
!settings.isInAppKioskMode;
- setIsVisible($('system-dialog-link'), this.shouldShowSystemDialogLink_());
+ setIsVisible(getRequiredElement('system-dialog-link'),
+ this.shouldShowSystemDialogLink_());
},
/**
@@ -807,7 +808,7 @@ cr.define('print_preview', function() {
assert(this.uiState_ == PrintPreview.UiState_.READY,
'Trying to open pdf in preview when not in ready state: ' +
this.uiState_);
- setIsVisible($('open-preview-app-throbber'), true);
+ setIsVisible(getRequiredElement('open-preview-app-throbber'), true);
this.previewArea_.showCustomMessage(
loadTimeData.getString('openingPDFInPreview'));
this.printDocumentOrOpenPdfPreview_(true /*isPdfPreview*/);
@@ -1143,7 +1144,7 @@ cr.define('print_preview', function() {
assert(this.uiState_ == PrintPreview.UiState_.READY,
'Opening Google Cloud Print dialog when not in ready state: ' +
this.uiState_);
- setIsVisible($('cloud-print-dialog-throbber'), true);
+ setIsVisible(getRequiredElement('cloud-print-dialog-throbber'), true);
this.setIsEnabled_(false);
this.uiState_ = PrintPreview.UiState_.OPENING_CLOUD_PRINT_DIALOG;
this.printIfReady_();
@@ -1157,10 +1158,10 @@ cr.define('print_preview', function() {
onDestinationSelect_: function() {
var selectedDest = this.destinationStore_.selectedDestination;
setIsVisible(
- $('cloud-print-dialog-link'),
+ getRequiredElement('cloud-print-dialog-link'),
selectedDest && !cr.isChromeOS && !selectedDest.isLocal);
setIsVisible(
- $('system-dialog-link'),
+ getRequiredElement('system-dialog-link'),
this.shouldShowSystemDialogLink_());
if (selectedDest && this.isInKioskAutoPrintMode_) {
this.onPrintButtonClick_();

Powered by Google App Engine
This is Rietveld 408576698