Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1693)

Unified Diff: printing/printed_document_cairo.cc

Issue 6516022: Linux: Refactor printing to be more like Windows/Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac build Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: printing/printed_document_cairo.cc
===================================================================
--- printing/printed_document_cairo.cc (revision 75320)
+++ printing/printed_document_cairo.cc (working copy)
@@ -1,19 +1,18 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// 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/file_util.h"
#include "base/logging.h"
-#include "base/message_loop.h"
#include "printing/page_number.h"
#include "printing/printed_page.h"
+#include "printing/printing_context_cairo.h"
namespace printing {
void PrintedDocument::RenderPrintedPage(
- const PrintedPage& page, gfx::NativeDrawingContext context) const {
+ const PrintedPage& page, PrintingContext* context) const {
#ifndef NDEBUG
{
// Make sure the page is from our list.
@@ -24,7 +23,12 @@
DCHECK(context);
- NOTIMPLEMENTED();
+#if !defined(OS_CHROMEOS)
+ if (page.page_number() == 1) {
+ reinterpret_cast<PrintingContextCairo*>(context)->PrintDocument(
+ page.native_metafile());
+ }
+#endif // !defined(OS_CHROMEOS)
}
void PrintedDocument::DrawHeaderFooter(gfx::NativeDrawingContext context,

Powered by Google App Engine
This is Rietveld 408576698