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

Unified Diff: chrome/browser/printing/print_view_manager.cc

Issue 6826027: Connect the right metafiles for print preview on Linux and Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile issues and rename MetafileInterface to Metafile Created 9 years, 8 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
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();

Powered by Google App Engine
This is Rietveld 408576698