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

Unified Diff: chrome/browser/ui/webui/print_preview_handler.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 problems 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
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/common/common_param_traits_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc
index 08f506a787b480d3ee511441b2603387e2e32120..9811baf05001402a808f2ac6898a8fa00ca94682 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -18,8 +18,8 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "printing/backend/print_backend.h"
-#include "printing/native_metafile_factory.h"
-#include "printing/native_metafile.h"
+#include "printing/metafile.h"
+#include "printing/metafile_impl.h"
#include "printing/print_job_constants.h"
namespace {
@@ -121,7 +121,7 @@ class EnumeratePrintersTaskProxy
class PrintToPdfTask : public Task {
public:
// Takes ownership of |metafile|.
- PrintToPdfTask(printing::NativeMetafile* metafile, const FilePath& path)
+ PrintToPdfTask(printing::Metafile* metafile, const FilePath& path)
: metafile_(metafile), path_(path) {
}
@@ -134,7 +134,7 @@ class PrintToPdfTask : public Task {
private:
// The metafile holding the PDF data.
- scoped_ptr<printing::NativeMetafile> metafile_;
+ scoped_ptr<printing::Metafile> metafile_;
// The absolute path where the file will be saved.
FilePath path_;
@@ -262,21 +262,15 @@ void PrintPreviewHandler::SelectFile() {
void PrintPreviewHandler::FileSelected(const FilePath& path,
int index, void* params) {
-#if defined(OS_POSIX)
PrintPreviewUIHTMLSource::PrintPreviewData data;
PrintPreviewUI* pp_ui = reinterpret_cast<PrintPreviewUI*>(web_ui_);
pp_ui->html_source()->GetPrintPreviewData(&data);
DCHECK(data.first != NULL);
DCHECK(data.second > 0);
- printing::NativeMetafile* metafile =
- printing::NativeMetafileFactory::CreateFromData(data.first->memory(),
- data.second);
- metafile->FinishDocument();
+ printing::PreviewMetafile* metafile = new printing::PreviewMetafile;
+ metafile->InitFromData(data.first->memory(), data.second);
PrintToPdfTask* task = new PrintToPdfTask(metafile, path);
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, task);
-#else
- NOTIMPLEMENTED();
-#endif
}
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/common/common_param_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698