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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 6696076: Adding CreateFromData to NativeMetafileFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 9 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/native_metafile_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d6a1da05ad2c6cb996ae5e893fce7dab52190d32..a66528581508d6e30f9f33cfaeee7f28d38144d3 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1187,10 +1187,11 @@ bool PluginInstance::PrintPDFOutput(PP_Resource print_output,
if (metafile)
ret = metafile->InitFromData(buffer->mapped_buffer(), buffer->size());
#elif defined(OS_MACOSX)
- scoped_ptr<printing::NativeMetafile> metafile(
- printing::NativeMetafileFactory::Create());
// Create a PDF metafile and render from there into the passed in context.
- if (metafile->InitFromData(buffer->mapped_buffer(), buffer->size())) {
+ scoped_ptr<printing::NativeMetafile> metafile(
+ printing::NativeMetafileFactory::CreateFromData(buffer->mapped_buffer(),
+ buffer->size()));
+ if (metafile.get() != NULL) {
// Flip the transform.
CGContextSaveGState(canvas);
CGContextTranslateCTM(canvas, 0,
« no previous file with comments | « printing/native_metafile_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698