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

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

Issue 10483006: Print support for Windows Metro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to ToT... Created 8 years, 6 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.h ('k') | chrome/browser/printing/printer_query.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 477336e11582d4759b9703f0b5ed884cb6ca5fa0..6f8a334d5bac9a275f993a3a20b28f42dd3f1d77 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -31,6 +31,7 @@
#include "grit/generated_resources.h"
#include "printing/metafile.h"
#include "printing/metafile_impl.h"
+#include "printing/print_destination_interface.h"
#include "printing/printed_document.h"
#include "ui/base/l10n/l10n_util.h"
@@ -101,6 +102,13 @@ bool PrintViewManager::AdvancedPrintNow() {
}
}
+bool PrintViewManager::PrintToDestination() {
+ // TODO(mad): Use a passed in destination interface instead.
+ g_browser_process->print_job_manager()->SetPrintDestination(
+ printing::CreatePrintDestination());
+ return PrintNowInternal(new PrintMsg_PrintPages(routing_id()));
+}
+
bool PrintViewManager::PrintPreviewNow() {
if (print_preview_state_ != NOT_PREVIEWING) {
NOTREACHED();
@@ -613,6 +621,8 @@ void PrintViewManager::ReleasePrinterQuery() {
int cookie = cookie_;
cookie_ = 0;
+ g_browser_process->print_job_manager()->SetPrintDestination(NULL);
+
printing::PrintJobManager* print_job_manager =
g_browser_process->print_job_manager();
« no previous file with comments | « chrome/browser/printing/print_view_manager.h ('k') | chrome/browser/printing/printer_query.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698