summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/print_preview/print_preview.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/resources/print_preview/print_preview.js')
-rw-r--r--chrome/browser/resources/print_preview/print_preview.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index 4beefe5..f262ba4 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"/>