Chromium Code Reviews| Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc |
| diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc |
| index 421d6763721a04dfb34ebe34528d6bfb9e56be17..7dd0a79bceb61ae080520cd223304b29c0f822b1 100644 |
| --- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc |
| +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc |
| @@ -22,7 +22,7 @@ |
| #include "ppapi/c/ppb_core.h" |
| #include "ppapi/c/ppb_instance.h" |
| #include "ppapi/c/ppp_instance.h" |
| -#include "printing/native_metafile.h" |
|
vandebo (ex-Chrome)
2011/02/22 22:18:16
Still used.
dpapad
2011/02/23 00:44:39
Done.
|
| +#include "printing/metafile_factory.h" |
| #include "printing/units.h" |
| #include "skia/ext/vector_platform_device.h" |
| #include "skia/ext/platform_canvas.h" |
| @@ -1028,15 +1028,16 @@ bool PluginInstance::PrintPDFOutput(PP_Resource print_output, |
| // directly. |
| cairo_t* context = canvas->beginPlatformPaint(); |
| printing::NativeMetafile* metafile = |
| - printing::NativeMetafile::FromCairoContext(context); |
| + printing::MetafileFactory::GetMetafileFrom(context); |
| DCHECK(metafile); |
| if (metafile) |
| ret = metafile->SetRawData(buffer->mapped_buffer(), buffer->size()); |
| canvas->endPlatformPaint(); |
| #elif defined(OS_MACOSX) |
| - printing::NativeMetafile metafile; |
| + scoped_ptr<printing::NativeMetafile> metafile( |
| + printing::MetafileFactory::GetMetafile()); |
| // Create a PDF metafile and render from there into the passed in context. |
| - if (metafile.Init(buffer->mapped_buffer(), buffer->size())) { |
| + if (metafile->Init(buffer->mapped_buffer(), buffer->size())) { |
| // Flip the transform. |
| CGContextSaveGState(canvas); |
| CGContextTranslateCTM(canvas, 0, |
| @@ -1048,7 +1049,7 @@ bool PluginInstance::PrintPDFOutput(PP_Resource print_output, |
| page_rect.size.width = current_print_settings_.printable_area.size.width; |
| page_rect.size.height = current_print_settings_.printable_area.size.height; |
| - ret = metafile.RenderPage(1, canvas, page_rect, true, false, true, true); |
| + ret = metafile->RenderPage(1, canvas, page_rect, true, false, true, true); |
| CGContextRestoreGState(canvas); |
| } |
| #elif defined(OS_WIN) |