diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 05:59:37 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 05:59:37 +0000 |
commit | 6fad26338ed6119903826156f307e20fe6657c31 (patch) | |
tree | 5c6baed35fce907a0cea47ed6091c941db8ebfd1 /chrome/browser/printing | |
parent | f75c8f13b967b01babc9454506e9d2ed00519e39 (diff) | |
download | chromium_src-6fad26338ed6119903826156f307e20fe6657c31.zip chromium_src-6fad26338ed6119903826156f307e20fe6657c31.tar.gz chromium_src-6fad26338ed6119903826156f307e20fe6657c31.tar.bz2 |
Third patch in getting rid of caching MessageLoop pointers and always using ChromeThread instead.
BUG=25354
Review URL: http://codereview.chromium.org/342068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing')
-rw-r--r-- | chrome/browser/printing/print_dialog_gtk.cc | 8 | ||||
-rw-r--r-- | chrome/browser/printing/print_dialog_gtk.h | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/chrome/browser/printing/print_dialog_gtk.cc b/chrome/browser/printing/print_dialog_gtk.cc index 7536a59..b35da24 100644 --- a/chrome/browser/printing/print_dialog_gtk.cc +++ b/chrome/browser/printing/print_dialog_gtk.cc @@ -10,9 +10,9 @@ #include "base/file_util.h" #include "base/logging.h" -#include "base/message_loop.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_window.h" +#include "chrome/browser/chrome_thread.h" #include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -58,9 +58,9 @@ class PdfUnsupportedInfoBarDelegate : public LinkInfoBarDelegate { } // namespace // static -void PrintDialogGtk::CreatePrintDialogForPdf(const FilePath& path, - MessageLoop* loop) { - loop->PostTask(FROM_HERE, +void PrintDialogGtk::CreatePrintDialogForPdf(const FilePath& path) { + ChromeThread::PostTask( + ChromeThread::UI, FROM_HERE, NewRunnableFunction(&PrintDialogGtk::CreateDialogImpl, path)); } diff --git a/chrome/browser/printing/print_dialog_gtk.h b/chrome/browser/printing/print_dialog_gtk.h index 7f9cc7f..589af80 100644 --- a/chrome/browser/printing/print_dialog_gtk.h +++ b/chrome/browser/printing/print_dialog_gtk.h @@ -11,16 +11,14 @@ #include "base/file_path.h" class Browser; -class MessageLoop; typedef struct _GtkPrintJob GtkPrintJob; // Currently this dialog only allows the user to choose a printer. class PrintDialogGtk { public: - // Called on the IO thread. Posts the dialog creation action on the given - // loop. - static void CreatePrintDialogForPdf(const FilePath& path, MessageLoop* loop); + // Called on the IO thread. + static void CreatePrintDialogForPdf(const FilePath& path); private: explicit PrintDialogGtk(const FilePath& path_to_pdf); |