diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-09 16:36:44 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-09 16:36:44 +0000 |
commit | d7546c4042bb93eb0be113debc9678b3ac7045c7 (patch) | |
tree | 09150ad121496b59d28dafc155600bda3827109c /chrome/common/pref_names.cc | |
parent | 2645a758e49d27e759c8c1075def8d7973e87e6f (diff) | |
download | chromium_src-d7546c4042bb93eb0be113debc9678b3ac7045c7.zip chromium_src-d7546c4042bb93eb0be113debc9678b3ac7045c7.tar.gz chromium_src-d7546c4042bb93eb0be113debc9678b3ac7045c7.tar.bz2 |
Implement Printer Preference Persistence (Step 1/3)
Introduce new "Preferences" for printer overlays were added in PrefNames:
- printing.page.header.left
- printing.page.header.center
- printing.page.header.right
- printing.page.footer.left
- printing.page.footer.center
- printing.page.footer.right
The prefs file will look like this:
"printing": {
"page": {
"header": {
"left": " ",
"center": " ",
"right": " "
},
"footer": {
"left": "{date}",
"center": " ",
"right": " "
}
}
}
The steps for Printer Preferences:
Step 1:
Introduce some sort of persistence for header/footer which is located
in the Preference file.
Step 2:
Allow PrinterQuery to read those stored preferences and setup
PrinterSettings so that it will apply it when printing.
Step 3:
Create a UI for the print preference, so that the users will easily
change those printing settings.
NOTE: I tested the following approach while doing a simple Hack with
PrintJob (if you see the previous patch), and it works great, with some
bad after effect.
It was done for testing purposes. So I hope we are going in the right
direction.
BUG=947 (http://crbug.com/947)
Patch contributed by Mohamed Mansour <m0.interactive@gmail.com>
Review: http://codereview.chromium.org/60118/show
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/pref_names.cc')
-rw-r--r-- | chrome/common/pref_names.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index d2608c5..300e6ab 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 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. @@ -235,6 +235,14 @@ const wchar_t kBookmarkManagerSplitLocation[] = // Boolean pref to define the default values for using spellchecker. const wchar_t kEnableSpellCheck[] = L"browser.enable_spellchecking"; +// String pref to define the default values for print overlays. +const wchar_t kPrintingPageHeaderLeft[] = L"printing.page.header.left"; +const wchar_t kPrintingPageHeaderCenter[] = L"printing.page.header.center"; +const wchar_t kPrintingPageHeaderRight[] = L"printing.page.header.right"; +const wchar_t kPrintingPageFooterLeft[] = L"printing.page.footer.left"; +const wchar_t kPrintingPageFooterCenter[] = L"printing.page.footer.center"; +const wchar_t kPrintingPageFooterRight[] = L"printing.page.footer.right"; + // *************** LOCAL STATE *************** // These are attached to the machine/installation |