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

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

Issue 7348010: Added Header and Footer support using Skia (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added SK_API to vector platform device skia Created 9 years, 4 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 4beefe5c179703a42327bd19c4714407106c00a4..f262ba425d260ce4fbdc05ac7e0d00dad0fab4eb 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -51,6 +51,9 @@ var copiesSettings;
// Object holding all the layout related settings.
var layoutSettings;
+// Object holding all the header footer related settings.
+var headerFooterSettings;
+
// Object holding all the color related settings.
var colorSettings;
@@ -104,10 +107,12 @@ function onLoad() {
pageSettings = print_preview.PageSettings.getInstance();
copiesSettings = print_preview.CopiesSettings.getInstance();
layoutSettings = print_preview.LayoutSettings.getInstance();
+ headerFooterSettings = print_preview.HeaderFooterSettings.getInstance();
colorSettings = print_preview.ColorSettings.getInstance();
printHeader.addEventListeners();
pageSettings.addEventListeners();
copiesSettings.addEventListeners();
+ headerFooterSettings.addEventListeners();
layoutSettings.addEventListeners();
colorSettings.addEventListeners();
$('printer-list').onchange = updateControlsWithSelectedPrinterCapabilities;
@@ -311,6 +316,7 @@ function getSettings() {
'color': colorSettings.isColor(),
'printToPDF': printToPDF,
'isFirstRequest' : false,
+ 'headerFooterEnabled': headerFooterSettings.hasHeaderFooter(),
'requestID': -1};
var printerList = $('printer-list');
@@ -957,5 +963,6 @@ function setDefaultValuesAndRegeneratePreview() {
<include src="print_header.js"/>
<include src="page_settings.js"/>
<include src="copies_settings.js"/>
+<include src="header_footer_settings.js"/>
<include src="layout_settings.js"/>
<include src="color_settings.js"/>

Powered by Google App Engine
This is Rietveld 408576698