diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-06 22:21:17 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-06 22:21:17 +0000 |
commit | 51e8d9357bb1738b462baa48da9f86e016f936ce (patch) | |
tree | 463241b65d5c3993992f62e313d49aebce220bfc /printing/printing_context.cc | |
parent | c27a5ed3f25971f028dd1baedd73efb59497ceeb (diff) | |
download | chromium_src-51e8d9357bb1738b462baa48da9f86e016f936ce.zip chromium_src-51e8d9357bb1738b462baa48da9f86e016f936ce.tar.gz chromium_src-51e8d9357bb1738b462baa48da9f86e016f936ce.tar.bz2 |
Printing: Convert PrintingContext into an interface implemented by the separate
platforms.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3610013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61714 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printing_context.cc')
-rw-r--r-- | printing/printing_context.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/printing/printing_context.cc b/printing/printing_context.cc new file mode 100644 index 0000000..933906d --- /dev/null +++ b/printing/printing_context.cc @@ -0,0 +1,31 @@ +// Copyright (c) 2010 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. + +#include "printing/printing_context.h" + +namespace printing { + +PrintingContext::PrintingContext() + : dialog_box_dismissed_(false), + in_print_job_(false), + abort_printing_(false) { +} + +PrintingContext::~PrintingContext() { +} + +void PrintingContext::ResetSettings() { + ReleaseContext(); + settings_.Clear(); + in_print_job_ = false; + dialog_box_dismissed_ = false; + abort_printing_ = false; +} + +PrintingContext::Result PrintingContext::OnError() { + ResetSettings(); + return abort_printing_ ? CANCEL : FAILED; +} + +} // namespace printing |