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

Unified Diff: printing/printed_document_mac.cc

Issue 2839323002: Revert of printing::Metafile: Simplify OS_MACOSX-specific code path (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « printing/pdf_metafile_skia.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printed_document_mac.cc
diff --git a/printing/printed_document_mac.cc b/printing/printed_document_mac.cc
index 0cd00e04afb6ee8c3a66953c67aefdd0f9fd8706..73286966f993986daba7c976d96427e62c0cb7ad 100644
--- a/printing/printed_document_mac.cc
+++ b/printing/printed_document_mac.cc
@@ -4,12 +4,11 @@
#include "printing/printed_document.h"
-#include <ApplicationServices/ApplicationServices.h>
-#include <CoreFoundation/CoreFoundation.h>
+#import <ApplicationServices/ApplicationServices.h>
+#import <CoreFoundation/CoreFoundation.h>
#include "base/logging.h"
#include "printing/page_number.h"
-#include "printing/pdf_metafile_cg_mac.h"
#include "printing/printed_page.h"
namespace printing {
@@ -32,16 +31,11 @@
page.GetCenteredPageContentRect(page_setup.physical_size(), &content_area);
const MetafilePlayer* metafile = page.metafile();
-
// Each Metafile is a one-page PDF, and pages use 1-based indexing.
const int page_number = 1;
- PdfMetafileCg::RenderPageParams params;
+ struct Metafile::MacRenderPageParams params;
params.autorotate = true;
- std::vector<char> buffer;
- if (metafile->GetDataAsVector(&buffer)) {
- PdfMetafileCg::RenderPage(buffer, page_number, context,
- content_area.ToCGRect(), params);
- }
+ metafile->RenderPage(page_number, context, content_area.ToCGRect(), params);
}
} // namespace printing
« no previous file with comments | « printing/pdf_metafile_skia.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698