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

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

Issue 740983002: Implement window.print() on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « chrome/browser/printing/printer_query.h ('k') | chrome/browser/printing/printing_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/printer_query.cc
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
index 6cd11ff067ef9537b1c6ee0131160c8eb8805b1d..014b5c172d465220dcc2cb040d9f9be67ac011c3 100644
--- a/chrome/browser/printing/printer_query.cc
+++ b/chrome/browser/printing/printer_query.cc
@@ -68,21 +68,24 @@ void PrinterQuery::GetSettings(
int expected_page_count,
bool has_selection,
MarginType margin_type,
+ bool is_scripted,
const base::Closure& callback) {
DCHECK(RunsTasksOnCurrentThread());
- DCHECK(!is_print_dialog_box_shown_);
+ DCHECK(!is_print_dialog_box_shown_ || !is_scripted);
StartWorker(callback);
// Real work is done in PrintJobWorker::GetSettings().
- is_print_dialog_box_shown_ = ask_user_for_settings == ASK_USER;
+ is_print_dialog_box_shown_ =
+ ask_user_for_settings == GetSettingsAskParam::ASK_USER;
worker_->PostTask(FROM_HERE,
base::Bind(&PrintJobWorker::GetSettings,
base::Unretained(worker_.get()),
is_print_dialog_box_shown_,
expected_page_count,
has_selection,
- margin_type));
+ margin_type,
+ is_scripted));
}
void PrinterQuery::SetSettings(scoped_ptr<base::DictionaryValue> new_settings,
« no previous file with comments | « chrome/browser/printing/printer_query.h ('k') | chrome/browser/printing/printing_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698