diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/printing/print_job_worker.cc | 16 | ||||
-rw-r--r-- | chrome/browser/printing/print_job_worker.h | 7 |
2 files changed, 4 insertions, 19 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(); diff --git a/chrome/browser/printing/print_job_worker.h b/chrome/browser/printing/print_job_worker.h index 50aec1b..4087194 100644 --- a/chrome/browser/printing/print_job_worker.h +++ b/chrome/browser/printing/print_job_worker.h @@ -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. @@ -83,9 +83,9 @@ class PrintJobWorker : public base::Thread { // context. void OnFailure(); -#if defined(OS_POSIX) // Asks the user for print settings. Must be called on the UI thread. - // Mac and Linux-only since Windows can display UI from non-main threads. + // Required on Mac and Linux. Windows can display UI from non-main threads, + // but sticks with this for consistency. void GetSettingsWithUI(gfx::NativeView parent_view, int document_page_count, bool has_selection); @@ -94,7 +94,6 @@ class PrintJobWorker : public base::Thread { // object that the print settings are set. This is needed in order to bounce // back into the IO thread for GetSettingsDone(). void GetSettingsWithUIDone(PrintingContext::Result result); -#endif // defined(OS_POSIX) // Reports settings back to owner_. void GetSettingsDone(PrintingContext::Result result); |