diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 04:11:17 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 04:11:17 +0000 |
commit | e79cf09fd1bd403396a65a3c02642b075ec3d1d9 (patch) | |
tree | b184c4278433829d5a2a07e590a6a6443cdd495c /chrome/browser/printing/print_job_worker.cc | |
parent | 14b717babacac57d34acdc534791622e728d6b8b (diff) | |
download | chromium_src-e79cf09fd1bd403396a65a3c02642b075ec3d1d9.zip chromium_src-e79cf09fd1bd403396a65a3c02642b075ec3d1d9.tar.gz chromium_src-e79cf09fd1bd403396a65a3c02642b075ec3d1d9.tar.bz2 |
Printing: Get settings on the UI thread on all platforms.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6027007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70591 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 | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc index 26b5fb3..201b2f7 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -84,26 +84,14 @@ void PrintJobWorker::GetSettings(bool ask_user_for_settings, printing_context_->set_use_overlays(use_overlays); if (ask_user_for_settings) { -#if defined(OS_POSIX) BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod(this, &PrintJobWorker::GetSettingsWithUI, parent_view, document_page_count, has_selection)); -#else - printing_context_->AskUserForSettings( - parent_view, - document_page_count, - has_selection, - NewCallback(this, &PrintJobWorker::GetSettingsDone)); -#endif // defined(OS_POSIX) } else { -#if defined(OS_POSIX) BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, NewRunnableMethod(this, &PrintJobWorker::UseDefaultSettings)); -#else - UseDefaultSettings(); -#endif // defined(OS_POSIX) } } @@ -122,7 +110,6 @@ void PrintJobWorker::GetSettingsDone(PrintingContext::Result result) { result)); } -#if defined(OS_POSIX) void PrintJobWorker::GetSettingsWithUI(gfx::NativeView parent_view, int document_page_count, bool has_selection) { @@ -139,7 +126,6 @@ void PrintJobWorker::GetSettingsWithUIDone(PrintingContext::Result result) { message_loop()->PostTask(FROM_HERE, NewRunnableMethod( this, &PrintJobWorker::GetSettingsDone, result)); } -#endif // defined(OS_POSIX) void PrintJobWorker::UseDefaultSettings() { PrintingContext::Result result = printing_context_->UseDefaultSettings(); |