diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-21 19:18:05 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-21 19:18:05 +0000 |
commit | b719142cac87c33ec2d6e99a238b5ecd48f87d68 (patch) | |
tree | cb073e88f553db6c3acab1c18c1f9e31793a80b7 /chrome/browser/printing/print_job_worker.cc | |
parent | b119a1e6bdd11040f93245e0b71d654a4883b40a (diff) | |
download | chromium_src-b719142cac87c33ec2d6e99a238b5ecd48f87d68.zip chromium_src-b719142cac87c33ec2d6e99a238b5ecd48f87d68.tar.gz chromium_src-b719142cac87c33ec2d6e99a238b5ecd48f87d68.tar.bz2 |
Printing: Implement PrintingContext::UseDefaultSettings for Linux/Cairo.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3389005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing/print_job_worker.cc')
-rw-r--r-- | chrome/browser/printing/print_job_worker.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc index 3a9ae03..dbc9544 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -85,9 +85,11 @@ void PrintJobWorker::GetSettings(bool ask_user_for_settings, parent_view, document_page_count, has_selection)); #else - PrintingContext::Result result = printing_context_.AskUserForSettings( - parent_view, document_page_count, has_selection); - GetSettingsDone(result); + printing_context_.AskUserForSettings( + parent_view, + document_page_count, + has_selection, + NewCallback(this, &PrintJobWorker::GetSettingsDone)); #endif } else { PrintingContext::Result result = printing_context_.UseDefaultSettings(); @@ -116,8 +118,14 @@ void PrintJobWorker::GetSettingsWithUI(gfx::NativeView parent_view, bool has_selection) { DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); - PrintingContext::Result result = printing_context_.AskUserForSettings( - parent_view, document_page_count, has_selection); + printing_context_.AskUserForSettings( + parent_view, + document_page_count, + has_selection, + NewCallback(this, &PrintJobWorker::GetSettingsWithUIDone)); +} + +void PrintJobWorker::GetSettingsWithUIDone(PrintingContext::Result result) { message_loop()->PostTask(FROM_HERE, NewRunnableMethod( this, &PrintJobWorker::GetSettingsDone, result)); } |