OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace printing { | 9 namespace printing { |
10 | 10 |
11 PrintingContext::PrintingContext() | 11 PrintingContext::PrintingContext() |
12 : | 12 : |
13 #ifndef NDEBUG | 13 #ifndef NDEBUG |
14 page_number_(-1), | 14 page_number_(-1), |
15 #endif | 15 #endif |
16 dialog_box_dismissed_(false), | 16 dialog_box_dismissed_(false), |
17 in_print_job_(false), | 17 in_print_job_(false), |
18 abort_printing_(false) { | 18 abort_printing_(false) { |
19 } | 19 } |
20 | 20 |
21 PrintingContext::~PrintingContext() { | 21 PrintingContext::~PrintingContext() { |
22 ResetSettings(); | 22 ResetSettings(); |
23 } | 23 } |
24 | 24 |
25 PrintingContext::Result PrintingContext::AskUserForSettings( | 25 PrintingContext::Result PrintingContext::AskUserForSettings( |
26 gfx::NativeWindow window, | 26 gfx::NativeView parent_view, |
27 int max_pages, | 27 int max_pages, |
28 bool has_selection) { | 28 bool has_selection) { |
29 | 29 |
30 NOTIMPLEMENTED(); | 30 NOTIMPLEMENTED(); |
31 | 31 |
32 return FAILED; | 32 return FAILED; |
33 } | 33 } |
34 | 34 |
35 PrintingContext::Result PrintingContext::UseDefaultSettings() { | 35 PrintingContext::Result PrintingContext::UseDefaultSettings() { |
36 DCHECK(!in_print_job_); | 36 DCHECK(!in_print_job_); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 void PrintingContext::DismissDialog() { | 117 void PrintingContext::DismissDialog() { |
118 NOTIMPLEMENTED(); | 118 NOTIMPLEMENTED(); |
119 } | 119 } |
120 | 120 |
121 PrintingContext::Result PrintingContext::OnError() { | 121 PrintingContext::Result PrintingContext::OnError() { |
122 ResetSettings(); | 122 ResetSettings(); |
123 return abort_printing_ ? CANCEL : FAILED; | 123 return abort_printing_ ? CANCEL : FAILED; |
124 } | 124 } |
125 | 125 |
126 } // namespace printing | 126 } // namespace printing |
OLD | NEW |