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

Issue 60118: Implement Printer Preference Persistence (Step 1/3) (Closed)

Created:
11 years, 8 months ago by Mohamed Mansour (USE mhm)
Modified:
9 years, 7 months ago
Reviewers:
M-A Ruel, Sverrir
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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 Set 1 #

Total comments: 6

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -6 lines) Patch
M chrome/browser/printing/page_overlays.h View 1 2 2 chunks +5 lines, -1 line 0 comments Download
chrome/browser/printing/page_overlays.cc View 1 2 2 chunks +49 lines, -1 line 0 comments Download
M chrome/browser/printing/page_overlays_unittest.cc View 2 chunks +14 lines, -1 line 0 comments Download
M chrome/common/pref_names.h View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 2 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Mohamed Mansour (USE mhm)
Hey guys, please review this, I learned quite a bit about how the Print infrastructure ...
11 years, 8 months ago (2009-04-05 04:11:34 UTC) #1
M-A Ruel
Sorry for the delay. I like the change, still some things to fix though. http://codereview.chromium.org/60118/diff/1/4 ...
11 years, 8 months ago (2009-04-06 20:51:41 UTC) #2
Mohamed Mansour (USE mhm)
Please review, we decided to split this into 3 sections. This would be the first ...
11 years, 8 months ago (2009-04-07 02:32:11 UTC) #3
M-A Ruel
http://codereview.chromium.org/60118/diff/1002/1004 File chrome/browser/printing/page_overlays.cc (right): http://codereview.chromium.org/60118/diff/1002/1004#newcode95 Line 95: bottom_left = input; Add default: at this level ...
11 years, 8 months ago (2009-04-07 15:42:58 UTC) #4
Mohamed Mansour (USE mhm)
On 2009/04/07 15:42:58, M-A wrote: > As a consequence, write an unit test for it. ...
11 years, 8 months ago (2009-04-07 23:50:03 UTC) #5
M-A Ruel
Committed as revision 13426
11 years, 8 months ago (2009-04-09 16:37:23 UTC) #6
Sverrir
11 years, 8 months ago (2009-04-09 16:58:01 UTC) #7
LGTM

Powered by Google App Engine
This is Rietveld 408576698