summaryrefslogtreecommitdiffstats
path: root/printing/printed_document_gtk.cc
diff options
context:
space:
mode:
authorjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 00:23:44 +0000
committerjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 00:23:44 +0000
commit82b72cb8de66c4fca92966f88d3b5118d3d4e569 (patch)
tree2858072ba7f32454e213b3ee4f450df297595fe2 /printing/printed_document_gtk.cc
parent12340436549231cd58aaa5af504c3bf8d0c3e904 (diff)
downloadchromium_src-82b72cb8de66c4fca92966f88d3b5118d3d4e569.zip
chromium_src-82b72cb8de66c4fca92966f88d3b5118d3d4e569.tar.gz
chromium_src-82b72cb8de66c4fca92966f88d3b5118d3d4e569.tar.bz2
Clean up cloud printing aura stub code.
BUG=102144 TEST=NONE Review URL: http://codereview.chromium.org/8763007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printed_document_gtk.cc')
-rw-r--r--printing/printed_document_gtk.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/printing/printed_document_gtk.cc b/printing/printed_document_gtk.cc
new file mode 100644
index 0000000..7a1fb32
--- /dev/null
+++ b/printing/printed_document_gtk.cc
@@ -0,0 +1,37 @@
+// Copyright (c) 2011 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/printed_document.h"
+
+#include "base/logging.h"
+#include "printing/page_number.h"
+#include "printing/printed_page.h"
+#include "printing/printing_context_gtk.h"
+
+namespace printing {
+
+void PrintedDocument::RenderPrintedPage(
+ const PrintedPage& page, PrintingContext* context) const {
+#ifndef NDEBUG
+ {
+ // Make sure the page is from our list.
+ base::AutoLock lock(lock_);
+ DCHECK(&page == mutable_.pages_.find(page.page_number() - 1)->second.get());
+ }
+#endif
+
+ DCHECK(context);
+
+#if !defined(OS_CHROMEOS)
+ {
+ base::AutoLock lock(lock_);
+ if (page.page_number() - 1 == mutable_.first_page) {
+ reinterpret_cast<PrintingContextGtk*>(context)->PrintDocument(
+ page.metafile());
+ }
+ }
+#endif // !defined(OS_CHROMEOS)
+}
+
+} // namespace printing