From d7546c4042bb93eb0be113debc9678b3ac7045c7 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Thu, 9 Apr 2009 16:36:44 +0000 Subject: 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 Review: http://codereview.chromium.org/60118/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13426 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/pref_names.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'chrome/common/pref_names.h') diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index f3c2b15..9ca99fa 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h @@ -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. @@ -81,7 +81,12 @@ extern const wchar_t kBookmarkManagerPlacement[]; extern const wchar_t kBookmarkManagerSplitLocation[]; extern const wchar_t kEnableSpellCheck[]; extern const wchar_t kDeleteTimePeriod[]; - +extern const wchar_t kPrintingPageHeaderLeft[]; +extern const wchar_t kPrintingPageHeaderCenter[]; +extern const wchar_t kPrintingPageHeaderRight[]; +extern const wchar_t kPrintingPageFooterLeft[]; +extern const wchar_t kPrintingPageFooterCenter[]; +extern const wchar_t kPrintingPageFooterRight[]; // Local state extern const wchar_t kAvailableProfiles[]; -- cgit v1.1