summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
authordpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 03:43:03 +0000
committerdpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 03:43:03 +0000
commitdd065d1c255abde678b26fcef9f9f784a3412f0f (patch)
treef0d5205cdfb354156b105d636b2e188785651b89 /chrome/browser/resources
parent36dfdd9dac98fb5834ff69f960c88a982ab084e7 (diff)
downloadchromium_src-dd065d1c255abde678b26fcef9f9f784a3412f0f.zip
chromium_src-dd065d1c255abde678b26fcef9f9f784a3412f0f.tar.gz
chromium_src-dd065d1c255abde678b26fcef9f9f784a3412f0f.tar.bz2
Fixing presubmit check js style errors.
BUG=122018 TEST=No presubmit errors Review URL: http://codereview.chromium.org/9980021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/print_preview/margins_ui.js11
-rw-r--r--chrome/browser/resources/print_preview/print_preview.js58
-rw-r--r--chrome/browser/resources/print_preview/print_preview_cloud.js2
-rw-r--r--chrome/browser/resources/print_preview/print_preview_utils.js5
4 files changed, 41 insertions, 35 deletions
diff --git a/chrome/browser/resources/print_preview/margins_ui.js b/chrome/browser/resources/print_preview/margins_ui.js
index bb2714c..c2d5309 100644
--- a/chrome/browser/resources/print_preview/margins_ui.js
+++ b/chrome/browser/resources/print_preview/margins_ui.js
@@ -81,10 +81,13 @@ cr.define('print_preview', function() {
* Updates the state of the margins UI.
* @param {print_preview.Rect} marginsRectangle A rectangle describing the
* four margins.
- * @param {Margins} marginValues
- * @param {Array.<number>} valueLimits
- * @param {boolean} keepDisplayedValue
- * @param {Array.<number>} valueLimitsInPercent
+ * @param {Margins} marginValues The margin values in points.
+ * @param {Array.<number>} valueLimits The maximum allowed margins for each
+ * side in points.
+ * @param {boolean} keepDisplayedValue True if the currently displayed
+ * margin values should not be updated.
+ * @param {Array.<number>} valueLimitsInPercent The maximum allowed margins
+ * for each side in percentages.
*/
update: function(marginsRectangle, marginValues, valueLimits,
keepDisplayedValue, valueLimitsInPercent) {
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index 8aab8b3..68d175f 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -20,17 +20,18 @@ var previewModifiable = false;
var hasPageSizeStyle = false;
// Destination list special value constants.
-const MANAGE_CLOUD_PRINTERS = 'manageCloudPrinters';
-const MANAGE_LOCAL_PRINTERS = 'manageLocalPrinters';
-const SIGN_IN = 'signIn';
-const PRINT_TO_PDF = 'Save as PDF';
-const PRINT_WITH_CLOUD_PRINT = 'printWithCloudPrint';
+
+/** @const */ var MANAGE_CLOUD_PRINTERS = 'manageCloudPrinters';
+/** @const */ var MANAGE_LOCAL_PRINTERS = 'manageLocalPrinters';
+/** @const */ var SIGN_IN = 'signIn';
+/** @const */ var PRINT_TO_PDF = 'Save as PDF';
+/** @const */ var PRINT_WITH_CLOUD_PRINT = 'printWithCloudPrint';
// State of the print preview settings.
var printSettings = new PrintSettings();
// Print ready data index.
-const PRINT_READY_DATA_INDEX = -1;
+/** @const */ var PRINT_READY_DATA_INDEX = -1;
// The name of the default or last used printer.
var defaultOrLastUsedPrinterName = '';
@@ -111,10 +112,10 @@ var lastClickedElement = null;
var addedCloudPrinters = {};
// The maximum number of cloud printers to allow in the dropdown.
-const maxCloudPrinters = 10;
+/** @const */ var maxCloudPrinters = 10;
-const MIN_REQUEST_ID = 0;
-const MAX_REQUEST_ID = 32000;
+/** @const */ var MIN_REQUEST_ID = 0;
+/** @const */ var MAX_REQUEST_ID = 32000;
// Names of all the custom events used.
var customEvents = {
@@ -1046,25 +1047,25 @@ function onPreviewPositionChanged() {
*/
function checkCompatiblePluginExists() {
var dummyPlugin = $('dummy-viewer');
- var pluginInterface = [ dummyPlugin.onload,
- dummyPlugin.goToPage,
- dummyPlugin.removePrintButton,
- dummyPlugin.loadPreviewPage,
- dummyPlugin.printPreviewPageCount,
- dummyPlugin.resetPrintPreviewUrl,
- dummyPlugin.onPluginSizeChanged,
- dummyPlugin.onScroll,
- dummyPlugin.pageXOffset,
- dummyPlugin.pageYOffset,
- dummyPlugin.setZoomLevel,
- dummyPlugin.setPageNumbers,
- dummyPlugin.setPageXOffset,
- dummyPlugin.setPageYOffset,
- dummyPlugin.getHorizontalScrollbarThickness,
- dummyPlugin.getVerticalScrollbarThickness,
- dummyPlugin.getPageLocationNormalized,
- dummyPlugin.getHeight,
- dummyPlugin.getWidth ];
+ var pluginInterface = [dummyPlugin.onload,
+ dummyPlugin.goToPage,
+ dummyPlugin.removePrintButton,
+ dummyPlugin.loadPreviewPage,
+ dummyPlugin.printPreviewPageCount,
+ dummyPlugin.resetPrintPreviewUrl,
+ dummyPlugin.onPluginSizeChanged,
+ dummyPlugin.onScroll,
+ dummyPlugin.pageXOffset,
+ dummyPlugin.pageYOffset,
+ dummyPlugin.setZoomLevel,
+ dummyPlugin.setPageNumbers,
+ dummyPlugin.setPageXOffset,
+ dummyPlugin.setPageYOffset,
+ dummyPlugin.getHorizontalScrollbarThickness,
+ dummyPlugin.getVerticalScrollbarThickness,
+ dummyPlugin.getPageLocationNormalized,
+ dummyPlugin.getHeight,
+ dummyPlugin.getWidth];
for (var i = 0; i < pluginInterface.length; i++) {
if (!pluginInterface[i])
@@ -1087,6 +1088,7 @@ function setDefaultValuesAndRegeneratePreview(resetMargins) {
/**
* Class that represents the state of the print settings.
+ * @constructor
*/
function PrintSettings() {
this.deviceName = '';
diff --git a/chrome/browser/resources/print_preview/print_preview_cloud.js b/chrome/browser/resources/print_preview/print_preview_cloud.js
index 90961ba..7c8b7c0 100644
--- a/chrome/browser/resources/print_preview/print_preview_cloud.js
+++ b/chrome/browser/resources/print_preview/print_preview_cloud.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/chrome/browser/resources/print_preview/print_preview_utils.js b/chrome/browser/resources/print_preview/print_preview_utils.js
index cc00d8d..c761650 100644
--- a/chrome/browser/resources/print_preview/print_preview_utils.js
+++ b/chrome/browser/resources/print_preview/print_preview_utils.js
@@ -120,8 +120,9 @@ function isPageRangeTextValid(pageRangeText, totalPageCount) {
*/
function pageRangeTextToPageList(pageRangeText, totalPageCount) {
var pageList = [];
- if ((totalPageCount && !isPageRangeTextValid(pageRangeText, totalPageCount))
- || !totalPageCount) {
+ if ((totalPageCount &&
+ !isPageRangeTextValid(pageRangeText, totalPageCount)) ||
+ !totalPageCount) {
return pageList;
}