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

Unified Diff: chrome/browser/printing/page_overlays.cc

Issue 60118: Implement Printer Preference Persistence (Step 1/3) (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 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
« no previous file with comments | « chrome/browser/printing/page_overlays.h ('k') | chrome/browser/printing/page_overlays_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/page_overlays.cc
===================================================================
--- chrome/browser/printing/page_overlays.cc (revision 13127)
+++ chrome/browser/printing/page_overlays.cc (working copy)
@@ -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.
@@ -84,6 +84,54 @@
return EmptyWString();
}
+void PageOverlays::SetOverlay(HorizontalPosition x, VerticalPosition y,
+ std::wstring& input) {
+ switch (x) {
+ case LEFT:
+ switch (y) {
+ case TOP:
+ top_left = input;
+ break;
+ case BOTTOM:
+ bottom_left = input;
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
+ break;
+ case CENTER:
+ switch (y) {
+ case TOP:
+ top_center = input;
+ break;
+ case BOTTOM:
+ bottom_center = input;
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
+ break;
+ case RIGHT:
+ switch (y) {
+ case TOP:
+ top_right = input;
+ break;
+ case BOTTOM:
+ bottom_right = input;
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
+}
+
//static
std::wstring PageOverlays::ReplaceVariables(const std::wstring& input,
const PrintedDocument& document,
« no previous file with comments | « chrome/browser/printing/page_overlays.h ('k') | chrome/browser/printing/page_overlays_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698