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

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

Issue 588713002: Compile print_preview, part 3: reduce down to 185 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview_2
Patch Set: fix assert 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/native_layer.js
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js
index 922ccb6a4b7ab8983c110a9854b11c24baae4d0d..7fc53facab09edae98570e83b7330901f663539e 100644
--- a/chrome/browser/resources/print_preview/native_layer.js
+++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -2,6 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+cr.exportPath('print_preview');
+
+/**
+ * @typedef {{selectSaveAsPdfDestination: boolean,
+ * layoutSettings.portrait: boolean,
+ * pageRange: string,
+ * headersAndFooters: boolean,
+ * backgroundColorsAndImages: boolean,
+ * margins: number}}
+ * @see chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
+ */
+print_preview.PreviewSettings;
+
cr.define('print_preview', function() {
'use strict';
@@ -180,7 +193,7 @@ cr.define('print_preview', function() {
getNativeColorModel_: function(destination, color) {
// For non-local printers native color model is ignored anyway.
var option = destination.isLocal ? color.getSelectedOption() : null;
- var nativeColorModel = parseInt(option ? option.vendor_id : null);
+ var nativeColorModel = parseInt(option ? option.vendor_id : null, 10);
if (isNaN(nativeColorModel)) {
return color.getValue() ?
NativeLayer.ColorMode_.COLOR : NativeLayer.ColorMode_.GRAY;
@@ -718,8 +731,8 @@ cr.define('print_preview', function() {
/**
* Dispatches an event to print_preview.js to change
* a particular setting for print preview.
- * @param {!Object} settings Object containing the value to be
- * changed and that value should be set to.
+ * @param {!print_preview.PreviewSettings} settings Object containing the
+ * value to be changed and that value should be set to.
* @private
*/
onManipulateSettingsForTest_: function(settings) {

Powered by Google App Engine
This is Rietveld 408576698