OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 namespace printing { | 7 namespace printing { |
8 | 8 |
9 PrintingContext::PrintingContext() | 9 PrintingContext::PrintingContext(const std::string& app_locale) |
10 : dialog_box_dismissed_(false), | 10 : dialog_box_dismissed_(false), |
11 in_print_job_(false), | 11 in_print_job_(false), |
12 abort_printing_(false) { | 12 abort_printing_(false), |
| 13 app_locale_(app_locale) { |
13 } | 14 } |
14 | 15 |
15 PrintingContext::~PrintingContext() { | 16 PrintingContext::~PrintingContext() { |
16 } | 17 } |
17 | 18 |
18 void PrintingContext::ResetSettings() { | 19 void PrintingContext::ResetSettings() { |
19 ReleaseContext(); | 20 ReleaseContext(); |
20 | 21 |
21 settings_.Clear(); | 22 settings_.Clear(); |
22 | 23 |
23 in_print_job_ = false; | 24 in_print_job_ = false; |
24 dialog_box_dismissed_ = false; | 25 dialog_box_dismissed_ = false; |
25 abort_printing_ = false; | 26 abort_printing_ = false; |
26 } | 27 } |
27 | 28 |
28 PrintingContext::Result PrintingContext::OnError() { | 29 PrintingContext::Result PrintingContext::OnError() { |
29 ResetSettings(); | 30 ResetSettings(); |
30 return abort_printing_ ? CANCEL : FAILED; | 31 return abort_printing_ ? CANCEL : FAILED; |
31 } | 32 } |
32 | 33 |
33 } // namespace printing | 34 } // namespace printing |
OLD | NEW |