summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorvitalybuka <vitalybuka@chromium.org>2014-08-28 20:11:56 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-29 03:13:23 +0000
commitfdd3212ca1a30226a09f5505a4331afcc0d0e8d2 (patch)
treef204fd9b038add6c166310b07c95ad1b95368f8c /chrome/renderer
parent50687650f80e74d4135f7002c1c1b30f94892b28 (diff)
downloadchromium_src-fdd3212ca1a30226a09f5505a4331afcc0d0e8d2.zip
chromium_src-fdd3212ca1a30226a09f5505a4331afcc0d0e8d2.tar.gz
chromium_src-fdd3212ca1a30226a09f5505a4331afcc0d0e8d2.tar.bz2
Removed NativeMetafile and PreviewMetafile typedef as it's always PdfMetafileSkia.
BUG=170859 TBR=sgurun, yzshen Review URL: https://codereview.chromium.org/516833002 Cr-Commit-Position: refs/heads/master@{#292561}
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/printing/mock_printer.cc4
-rw-r--r--chrome/renderer/printing/print_web_view_helper.cc10
-rw-r--r--chrome/renderer/printing/print_web_view_helper.h6
-rw-r--r--chrome/renderer/printing/print_web_view_helper_linux.cc6
-rw-r--r--chrome/renderer/printing/print_web_view_helper_mac.mm7
-rw-r--r--chrome/renderer/printing/print_web_view_helper_pdf_win.cc6
6 files changed, 19 insertions, 20 deletions
diff --git a/chrome/renderer/printing/mock_printer.cc b/chrome/renderer/printing/mock_printer.cc
index bb44c89..dba8a34 100644
--- a/chrome/renderer/printing/mock_printer.cc
+++ b/chrome/renderer/printing/mock_printer.cc
@@ -11,7 +11,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/print_messages.h"
#include "ipc/ipc_message_utils.h"
-#include "printing/metafile_impl.h"
+#include "printing/pdf_metafile_skia.h"
#include "printing/units.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -216,7 +216,7 @@ void MockPrinter::PrintPage(const PrintHostMsg_DidPrintPage_Params& params) {
#if defined(OS_MACOSX)
printing::PdfMetafileCg metafile;
#else
- printing::NativeMetafile metafile;
+ printing::PdfMetafileSkia metafile;
#endif
metafile.InitFromData(metafile_data.memory(), params.data_size);
printing::Image image(metafile);
diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc
index 27ea08f..db73c37 100644
--- a/chrome/renderer/printing/print_web_view_helper.cc
+++ b/chrome/renderer/printing/print_web_view_helper.cc
@@ -27,7 +27,7 @@
#include "content/public/renderer/render_view.h"
#include "net/base/escape.h"
#include "printing/metafile.h"
-#include "printing/metafile_impl.h"
+#include "printing/pdf_metafile_skia.h"
#include "printing/units.h"
#include "skia/ext/vector_platform_device_skia.h"
#include "third_party/WebKit/public/platform/WebSize.h"
@@ -1146,7 +1146,7 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
print_preview_context_.FinalizePrintReadyDocument();
// Get the size of the resulting metafile.
- PreviewMetafile* metafile = print_preview_context_.metafile();
+ PdfMetafileSkia* metafile = print_preview_context_.metafile();
uint32 buf_size = metafile->GetDataSize();
DCHECK_GT(buf_size, 0u);
@@ -1769,10 +1769,10 @@ bool PrintWebViewHelper::PrintPreviewContext::CreatePreviewDocument(
return false;
}
- metafile_.reset(new PreviewMetafile);
+ metafile_.reset(new PdfMetafileSkia);
if (!metafile_->Init()) {
set_error(PREVIEW_ERROR_METAFILE_INIT_FAILED);
- LOG(ERROR) << "PreviewMetafile Init failed";
+ LOG(ERROR) << "PdfMetafileSkia Init failed";
return false;
}
@@ -1937,7 +1937,7 @@ bool PrintWebViewHelper::PrintPreviewContext::generate_draft_pages() const {
return generate_draft_pages_;
}
-PreviewMetafile* PrintWebViewHelper::PrintPreviewContext::metafile() {
+PdfMetafileSkia* PrintWebViewHelper::PrintPreviewContext::metafile() {
DCHECK(IsRendering());
return metafile_.get();
}
diff --git a/chrome/renderer/printing/print_web_view_helper.h b/chrome/renderer/printing/print_web_view_helper.h
index 53fde04..b4d7d06 100644
--- a/chrome/renderer/printing/print_web_view_helper.h
+++ b/chrome/renderer/printing/print_web_view_helper.h
@@ -15,7 +15,7 @@
#include "base/time/time.h"
#include "content/public/renderer/render_view_observer.h"
#include "content/public/renderer/render_view_observer_tracker.h"
-#include "printing/metafile_impl.h"
+#include "printing/pdf_metafile_skia.h"
#include "third_party/WebKit/public/platform/WebCanvas.h"
#include "third_party/WebKit/public/web/WebNode.h"
#include "third_party/WebKit/public/web/WebPrintParams.h"
@@ -381,7 +381,7 @@ class PrintWebViewHelper
int total_page_count() const;
bool generate_draft_pages() const;
- PreviewMetafile* metafile();
+ PdfMetafileSkia* metafile();
gfx::Size GetPrintCanvasSize() const;
int last_error() const;
@@ -401,7 +401,7 @@ class PrintWebViewHelper
blink::WebNode source_node_;
scoped_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
- scoped_ptr<PreviewMetafile> metafile_;
+ scoped_ptr<PdfMetafileSkia> metafile_;
// Total page count in the renderer.
int total_page_count_;
diff --git a/chrome/renderer/printing/print_web_view_helper_linux.cc b/chrome/renderer/printing/print_web_view_helper_linux.cc
index 666bf13..948c48d 100644
--- a/chrome/renderer/printing/print_web_view_helper_linux.cc
+++ b/chrome/renderer/printing/print_web_view_helper_linux.cc
@@ -9,9 +9,9 @@
#include "chrome/common/print_messages.h"
#include "content/public/renderer/render_thread.h"
#include "printing/metafile.h"
-#include "printing/metafile_impl.h"
#include "printing/metafile_skia_wrapper.h"
#include "printing/page_size_margins.h"
+#include "printing/pdf_metafile_skia.h"
#include "skia/ext/platform_device.h"
#include "skia/ext/vector_canvas.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -35,7 +35,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
scoped_ptr<Metafile> draft_metafile;
Metafile* initial_render_metafile = print_preview_context_.metafile();
if (print_preview_context_.IsModifiable() && is_print_ready_metafile_sent_) {
- draft_metafile.reset(new PreviewMetafile);
+ draft_metafile.reset(new PdfMetafileSkia);
initial_render_metafile = draft_metafile.get();
}
@@ -60,7 +60,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
int page_count,
const gfx::Size& canvas_size) {
- NativeMetafile metafile;
+ PdfMetafileSkia metafile;
if (!metafile.Init())
return false;
diff --git a/chrome/renderer/printing/print_web_view_helper_mac.mm b/chrome/renderer/printing/print_web_view_helper_mac.mm
index 207eea7..219a4fa 100644
--- a/chrome/renderer/printing/print_web_view_helper_mac.mm
+++ b/chrome/renderer/printing/print_web_view_helper_mac.mm
@@ -11,7 +11,6 @@
#include "base/metrics/histogram.h"
#include "chrome/common/print_messages.h"
#include "printing/metafile.h"
-#include "printing/metafile_impl.h"
#include "printing/metafile_skia_wrapper.h"
#include "printing/page_size_margins.h"
#include "skia/ext/platform_device.h"
@@ -27,7 +26,7 @@ void PrintWebViewHelper::PrintPageInternal(
const PrintMsg_PrintPage_Params& params,
const gfx::Size& canvas_size,
WebFrame* frame) {
- NativeMetafile metafile;
+ PdfMetafileSkia metafile;
if (!metafile.Init())
return;
@@ -65,11 +64,11 @@ bool PrintWebViewHelper::RenderPreviewPage(
is_print_ready_metafile_sent_;
if (render_to_draft) {
- draft_metafile.reset(new PreviewMetafile());
+ draft_metafile.reset(new PdfMetafileSkia());
if (!draft_metafile->Init()) {
print_preview_context_.set_error(
PREVIEW_ERROR_MAC_DRAFT_METAFILE_INIT_FAILED);
- LOG(ERROR) << "Draft PreviewMetafile Init failed";
+ LOG(ERROR) << "Draft PdfMetafileSkia Init failed";
return false;
}
initial_render_metafile = draft_metafile.get();
diff --git a/chrome/renderer/printing/print_web_view_helper_pdf_win.cc b/chrome/renderer/printing/print_web_view_helper_pdf_win.cc
index 7461f7e..e2d963e 100644
--- a/chrome/renderer/printing/print_web_view_helper_pdf_win.cc
+++ b/chrome/renderer/printing/print_web_view_helper_pdf_win.cc
@@ -10,9 +10,9 @@
#include "chrome/common/print_messages.h"
#include "content/public/renderer/render_thread.h"
#include "printing/metafile.h"
-#include "printing/metafile_impl.h"
#include "printing/metafile_skia_wrapper.h"
#include "printing/page_size_margins.h"
+#include "printing/pdf_metafile_skia.h"
#include "printing/units.h"
#include "skia/ext/platform_device.h"
#include "skia/ext/vector_canvas.h"
@@ -32,7 +32,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
scoped_ptr<Metafile> draft_metafile;
Metafile* initial_render_metafile = print_preview_context_.metafile();
if (print_preview_context_.IsModifiable() && is_print_ready_metafile_sent_) {
- draft_metafile.reset(new PreviewMetafile);
+ draft_metafile.reset(new PdfMetafileSkia);
initial_render_metafile = draft_metafile.get();
}
@@ -59,7 +59,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
int page_count,
const gfx::Size& canvas_size) {
- NativeMetafile metafile;
+ PdfMetafileSkia metafile;
if (!metafile.Init())
return false;