Chromium Code Reviews| Index: chrome/renderer/webplugin_delegate_proxy.cc |
| diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc |
| index 0c988713caf0f116f76a449c08e267e44cc6be5d..81b2fbefed62df3b603568ab762dfb57e1a10786 100644 |
| --- a/chrome/renderer/webplugin_delegate_proxy.cc |
| +++ b/chrome/renderer/webplugin_delegate_proxy.cc |
| @@ -15,6 +15,7 @@ |
| #include "base/file_util.h" |
| #include "base/logging.h" |
| #include "base/ref_counted.h" |
| +#include "base/scoped_ptr.h" |
| #include "base/string_split.h" |
| #include "base/string_util.h" |
| #include "base/sys_info.h" |
| @@ -33,7 +34,7 @@ |
| #include "grit/renderer_resources.h" |
| #include "ipc/ipc_channel_handle.h" |
| #include "net/base/mime_util.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 "skia/ext/platform_canvas.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
| @@ -926,13 +927,14 @@ void WebPluginDelegateProxy::Print(gfx::NativeDrawingContext context) { |
| } |
| #if defined(OS_WIN) |
| - printing::NativeMetafile metafile; |
| - if (!metafile.Init(memory.memory(), size)) { |
| + scoped_ptr<printing::NativeMetafile> metafile( |
| + printing::MetafileFactory::GetMetafile()); |
| + if (!metafile->Init(memory.memory(), size)) { |
| NOTREACHED(); |
| return; |
| } |
| // Playback the buffer. |
| - metafile.Playback(context, NULL); |
| + metafile->Playback(context, NULL); |
| #else |
| // TODO(port): plugin printing. |
| NOTIMPLEMENTED(); |