Index: chrome/browser/printing/print_view_manager.cc |
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc |
index 4d8cdda626e958004becc45f1d9164782ce303ca..ddb8da9bc03ae0e54d744e044e6ec70569f53e11 100644 |
--- a/chrome/browser/printing/print_view_manager.cc |
+++ b/chrome/browser/printing/print_view_manager.cc |
@@ -19,8 +19,8 @@ |
#include "content/common/notification_details.h" |
#include "content/common/notification_source.h" |
#include "grit/generated_resources.h" |
-#include "printing/native_metafile.h" |
-#include "printing/native_metafile_factory.h" |
+#include "printing/metafile.h" |
+#include "printing/metafile_impl.h" |
Lei Zhang
2011/04/11 02:51:10
you probably don't need both. metafile_impl.h will
vandebo (ex-Chrome)
2011/04/11 06:16:08
I agree that in this case we probably only need me
|
#include "printing/printed_document.h" |
#include "ui/base/l10n/l10n_util.h" |
@@ -146,10 +146,9 @@ void PrintViewManager::OnDidPrintPage( |
} |
} |
- scoped_ptr<NativeMetafile> metafile; |
+ scoped_ptr<Metafile> metafile(new printing::NativeMetafile); |
if (metafile_must_be_valid) { |
- metafile.reset(NativeMetafileFactory::CreateFromData(shared_buf.memory(), |
- params.data_size)); |
+ metafile->InitFromData(shared_buf.memory(), params.data_size); |
Lei Zhang
2011/04/11 02:51:10
Need to check return value, and remove the if chec
vandebo (ex-Chrome)
2011/04/11 06:16:08
Done.
|
if (!metafile.get()) { |
NOTREACHED() << "Invalid metafile header"; |
tab_contents()->Stop(); |