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

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

Issue 8605001: Print Preview: Fixing code style issues reported by gsjlint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 1 month 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 824b5dc24883aca377b410cb559574775e2ee582..837e2c0a81487e25526e817df2a06b94d7ad8b91 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -125,8 +125,8 @@ var customEvents = {
// Fired when the print button needs to be updated.
UPDATE_PRINT_BUTTON: 'updatePrintButton',
// Fired when the print summary needs to be updated.
- UPDATE_SUMMARY: 'updateSummary',
-}
+ UPDATE_SUMMARY: 'updateSummary'
+};
/**
* Window onload handler, sets up the page and starts print preview by getting
@@ -175,7 +175,6 @@ function onLoad() {
}
/**
- * @param {string} initiatorTabTitle The title of the initiator tab.
* @param {object} initialSettings An object containing all the initial
* settings.
*/
@@ -348,7 +347,7 @@ function reloadPrintersList() {
/**
* Turn on the integration of Cloud Print.
- * @param {string} cloudPrintUrl The URL to use for cloud print servers.
+ * @param {string} cloudPrintURL The URL to use for cloud print servers.
*/
function setUseCloudPrint(cloudPrintURL) {
useCloudPrint = true;
@@ -476,7 +475,7 @@ function isExpectedPreviewResponse(previewResponseId) {
* @return {string} The name of the currently selected printer.
*/
function getSelectedPrinterName() {
- var printerList = $('printer-list')
+ var printerList = $('printer-list');
var selectedPrinter = printerList.selectedIndex;
if (selectedPrinter < 0)
return '';
@@ -611,7 +610,7 @@ function fileSelectionCompleted() {
/**
* Set the default printer. If there is one, generate a print preview.
- * @param {string} printer Name of the default printer. Empty if none.
+ * @param {string} printerName Name of the default printer. Empty if none.
* @param {string} cloudPrintData Cloud print related data to restore if
* the default printer is a cloud printer.
*/
@@ -715,6 +714,8 @@ function createDestinationListOption(optionText, optionValue, isDefault,
* @param {string} optionValue specifies the option value.
* @param {boolean} isDefault is true if the option needs to be selected.
* @param {boolean} isDisabled is true if the option needs to be disabled.
+ * @param {boolean} isSeparator is true if the option serves just as a
+ * separator.
* @return {Object} The created option.
*/
function addDestinationListOption(optionText, optionValue, isDefault,
@@ -736,6 +737,8 @@ function addDestinationListOption(optionText, optionValue, isDefault,
* @param {string} optionValue specifies the option value.
* @param {boolean} isDefault is true if the option needs to be selected.
* @param {boolean} isDisabled is true if the option needs to be disabled.
+ * @param {boolean} isSeparator is true if the option is a visual separator and
+ * needs to be disabled.
* @return {Object} The created option.
*/
function addDestinationListOptionAtPosition(position,
@@ -877,8 +880,10 @@ function reloadPreviewPages(previewUid, previewResponseId) {
cr.dispatchSimpleEvent(document, customEvents.UPDATE_PRINT_BUTTON);
checkAndHideOverlayLayerIfValid();
var pageSet = pageSettings.previouslySelectedPages;
- for (var i = 0; i < pageSet.length; i++)
- $('pdf-viewer').loadPreviewPage(getPageSrcURL(previewUid, pageSet[i]-1), i);
+ for (var i = 0; i < pageSet.length; i++) {
+ $('pdf-viewer').loadPreviewPage(
+ getPageSrcURL(previewUid, pageSet[i] - 1), i);
+ }
hasPendingPreviewRequest = false;
isPrintReadyMetafileReady = true;
@@ -928,7 +933,6 @@ function onDidPreviewPage(pageNumber, previewUid, previewResponseId) {
* Update the print preview when new preview data is available.
* Create the PDF plugin as needed.
* Called from PrintPreviewUI::PreviewDataIsAvailable().
- * @param {boolean} modifiable If the preview is modifiable.
* @param {string} previewUid Preview unique identifier.
* @param {number} previewResponseId The preview request id that resulted in
* this response.
@@ -1069,6 +1073,7 @@ function checkCompatiblePluginExists() {
/**
* Sets the default values and sends a request to regenerate preview data.
* Resets the margin options only if |resetMargins| is true.
+ * @param {boolean} resetMargins True if margin settings should be resetted.
*/
function setDefaultValuesAndRegeneratePreview(resetMargins) {
if (resetMargins)
@@ -1093,7 +1098,7 @@ PrintSettings.prototype.save = function() {
this.deviceName = getSelectedPrinterName();
this.isLandscape = layoutSettings.isLandscape();
this.hasHeaderFooter = headerFooterSettings.hasHeaderFooter();
-}
+};
/**
* Updates the title of the print preview tab according to |initiatorTabTitle|.

Powered by Google App Engine
This is Rietveld 408576698