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

Unified Diff: printing/printing_context_win.cc

Issue 766823004: Switch back to PrintDlgEx instead of DocumentProperties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mon Dec 8 10:05:14 PST 2014 Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context_win.cc
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index ae71b9b21f1220effbe4d32f073665b9b7e14e19..c396b1a5058bdd856fc76827967a1bdf8fa4717e 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "printing/backend/print_backend.h"
@@ -24,6 +25,14 @@
namespace printing {
+namespace {
+
+void AssingResult(PrintingContext::Result* out, PrintingContext::Result in) {
+ *out = in;
+}
+
+} // namespace
+
// static
scoped_ptr<PrintingContext> PrintingContext::Create(Delegate* delegate) {
#if defined(ENABLE_BASIC_PRINTING)
@@ -198,8 +207,9 @@ PrintingContext::Result PrintingContextWin::UpdatePrinterSettings(
// Update data using DocumentProperties.
if (show_system_dialog) {
- scoped_dev_mode = ShowPrintDialog(
- printer.Get(), delegate_->GetParentView(), scoped_dev_mode.get());
+ PrintingContext::Result result = PrintingContext::FAILED;
+ AskUserForSettings(0, false, base::Bind(&AssingResult, &result));
+ return result;
} else {
scoped_dev_mode = CreateDevMode(printer.Get(), scoped_dev_mode.get());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698