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

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: 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 b2f110bf77cc031a78ac7daf96b84b3e1ee0ecea..deec69a5ac832a5f990944bee90fd2b29ebe6d95 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -176,11 +176,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_,
@@ -191,6 +186,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_);
@@ -345,15 +345,15 @@ 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));
this.tracker.add(
- $('open-pdf-in-preview-link'),
+ getRequiredElement('open-pdf-in-preview-link'),
'click',
this.onOpenPdfInPreviewLinkClick_.bind(this));
@@ -463,7 +463,7 @@ cr.define('print_preview', function() {
this.moreSettings_.decorate($('more-settings'));
this.previewArea_.decorate($('preview-area'));
- setIsVisible($('open-pdf-in-preview-link'), cr.isMac);
+ setIsVisible(getRequiredElement('open-pdf-in-preview-link'), cr.isMac);
},
/**
@@ -583,7 +583,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();
@@ -626,7 +626,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_());
},
/**
@@ -799,7 +800,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(
localStrings.getString('openingPDFInPreview'));
this.printDocumentOrOpenPdfPreview_(true /*isPdfPreview*/);
@@ -1138,7 +1139,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_();
@@ -1152,10 +1153,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