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

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

Issue 480303002: Use document from preview for System Dialog printing on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue 08/19/2014 11:17:57.84 Created 6 years, 4 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_job_worker.cc
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index dd9c84b101ee8be6953bf708d073c0ea539e0b0e..276f5f69f698377e6b5d758d49c7caab47cb5625 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -114,7 +114,8 @@ void PrintJobWorker::GetSettings(
}
void PrintJobWorker::SetSettings(
- const base::DictionaryValue* const new_settings) {
+ scoped_ptr<PrintingUIWebContentsObserver> web_contents_observer,
+ scoped_ptr<base::DictionaryValue> new_settings) {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
BrowserThread::PostTask(
@@ -124,13 +125,17 @@ void PrintJobWorker::SetSettings(
make_scoped_refptr(owner_),
base::Bind(&PrintJobWorker::UpdatePrintSettings,
base::Unretained(this),
- base::Owned(new_settings))));
+ base::Passed(&web_contents_observer),
+ base::Passed(&new_settings))));
}
void PrintJobWorker::UpdatePrintSettings(
- const base::DictionaryValue* const new_settings) {
- PrintingContext::Result result =
- printing_context_->UpdatePrintSettings(*new_settings);
+ scoped_ptr<PrintingUIWebContentsObserver> web_contents_observer,
+ scoped_ptr<base::DictionaryValue> new_settings) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ PrintingContext::Result result = printing_context_->UpdatePrintSettings(
+ *new_settings,
+ web_contents_observer ? web_contents_observer->GetParentView() : NULL);
GetSettingsDone(result);
}

Powered by Google App Engine
This is Rietveld 408576698