OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "printing/printing_context.h" |
| 6 |
| 7 namespace printing { |
| 8 |
| 9 PrintingContext::PrintingContext() |
| 10 : dialog_box_dismissed_(false), |
| 11 in_print_job_(false), |
| 12 abort_printing_(false) { |
| 13 } |
| 14 |
| 15 PrintingContext::~PrintingContext() { |
| 16 } |
| 17 |
| 18 void PrintingContext::ResetSettings() { |
| 19 ReleaseContext(); |
| 20 settings_.Clear(); |
| 21 in_print_job_ = false; |
| 22 dialog_box_dismissed_ = false; |
| 23 abort_printing_ = false; |
| 24 } |
| 25 |
| 26 PrintingContext::Result PrintingContext::OnError() { |
| 27 ResetSettings(); |
| 28 return abort_printing_ ? CANCEL : FAILED; |
| 29 } |
| 30 |
| 31 } // namespace printing |
OLD | NEW |