summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing/printer_query.h
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-28 23:20:30 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-28 23:20:30 +0000
commitb09dd5a3a160704f36e8e5853ba1f07290c1ad4d (patch)
treeb347ac1c4663ad4f2465a834a5bcb1a17c5aaf8c /chrome/browser/printing/printer_query.h
parentb3da27455db463c7cf9a5c1686734ec1b4e56e3a (diff)
downloadchromium_src-b09dd5a3a160704f36e8e5853ba1f07290c1ad4d.zip
chromium_src-b09dd5a3a160704f36e8e5853ba1f07290c1ad4d.tar.gz
chromium_src-b09dd5a3a160704f36e8e5853ba1f07290c1ad4d.tar.bz2
base::Bind: Convert printing_message_filter.cc.
This file superfluously used CancelableTask. I cleaned up around the areas I touched. BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8718001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing/printer_query.h')
-rw-r--r--chrome/browser/printing/printer_query.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/printing/printer_query.h b/chrome/browser/printing/printer_query.h
index 3add3e4..dcb2f6a 100644
--- a/chrome/browser/printing/printer_query.h
+++ b/chrome/browser/printing/printer_query.h
@@ -6,13 +6,13 @@
#define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_
#pragma once
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/printing/print_job_worker_owner.h"
#include "printing/print_job_constants.h"
#include "ui/gfx/native_widget_types.h"
-class CancelableTask;
class MessageLoop;
namespace base {
@@ -51,11 +51,11 @@ class PrinterQuery : public PrintJobWorkerOwner {
int expected_page_count,
bool has_selection,
MarginType margin_type,
- CancelableTask* callback);
+ const base::Closure& callback);
// Updates the current settings with |new_settings| dictionary values.
void SetSettings(const base::DictionaryValue& new_settings,
- CancelableTask* callback);
+ const base::Closure& callback);
// Stops the worker thread since the client is done with this object.
void StopWorker();
@@ -72,8 +72,7 @@ class PrinterQuery : public PrintJobWorkerOwner {
virtual ~PrinterQuery();
// Lazy create the worker thread. There is one worker thread per print job.
- // Returns true, if worker thread exists or has been created.
- bool StartWorker(CancelableTask* callback);
+ void StartWorker(const base::Closure& callback);
// Main message loop reference. Used to send notifications in the right
// thread.
@@ -96,8 +95,8 @@ class PrinterQuery : public PrintJobWorkerOwner {
// Results from the last GetSettingsDone() callback.
PrintingContext::Result last_status_;
- // Task waiting to be executed.
- scoped_ptr<CancelableTask> callback_;
+ // Callback waiting to be run.
+ base::Closure callback_;
DISALLOW_COPY_AND_ASSIGN(PrinterQuery);
};