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

Side by Side Diff: printing/printing_context.cc

Issue 7670045: Revert 97219 - Added Header and Footer support in Linux, Windows and Mac for Skia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/printing_context.h ('k') | printing/printing_context_cairo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/printing_context.h" 5 #include "printing/printing_context.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "printing/print_settings_initializer.h"
9 8
10 namespace printing { 9 namespace printing {
11 10
12 PrintingContext::PrintingContext(const std::string& app_locale) 11 PrintingContext::PrintingContext(const std::string& app_locale)
13 : dialog_box_dismissed_(false), 12 : dialog_box_dismissed_(false),
14 in_print_job_(false), 13 in_print_job_(false),
15 abort_printing_(false), 14 abort_printing_(false),
16 app_locale_(app_locale) { 15 app_locale_(app_locale) {
17 } 16 }
18 17
19 PrintingContext::~PrintingContext() { 18 PrintingContext::~PrintingContext() {
20 } 19 }
21 20
22 void PrintingContext::ResetSettings() { 21 void PrintingContext::ResetSettings() {
23 ReleaseContext(); 22 ReleaseContext();
24 23
25 settings_.Clear(); 24 settings_.Clear();
26 25
27 in_print_job_ = false; 26 in_print_job_ = false;
28 dialog_box_dismissed_ = false; 27 dialog_box_dismissed_ = false;
29 abort_printing_ = false; 28 abort_printing_ = false;
30 } 29 }
31 30
32 PrintingContext::Result PrintingContext::OnError() { 31 PrintingContext::Result PrintingContext::OnError() {
33 ResetSettings(); 32 ResetSettings();
34 return abort_printing_ ? CANCEL : FAILED; 33 return abort_printing_ ? CANCEL : FAILED;
35 } 34 }
36 35
37 PrintingContext::Result PrintingContext::UpdatePrintSettings(
38 const base::DictionaryValue& job_settings,
39 const PageRanges& ranges) {
40 PrintingContext::Result result = UpdatePrinterSettings(job_settings, ranges);
41 printing::PrintSettingsInitializer::InitHeaderFooterStrings(job_settings,
42 &settings_);
43 return result;
44 }
45
46 } // namespace printing 36 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing_context.h ('k') | printing/printing_context_cairo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698