Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Unified Diff: chrome/browser/automation/ui_controls_internal.cc

Issue 8212006: base::Bind: Cleanup in automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/ui_controls_internal.cc
diff --git a/chrome/browser/automation/ui_controls_internal.cc b/chrome/browser/automation/ui_controls_internal.cc
index 25598e850797a69058afabd7f34caa97fd187814..8cb5ec3685e8ba14e21eb7562d084971989c48d4 100644
--- a/chrome/browser/automation/ui_controls_internal.cc
+++ b/chrome/browser/automation/ui_controls_internal.cc
@@ -6,17 +6,11 @@
namespace ui_controls {
-ClickTask::ClickTask(MouseButton button, int state, Task* followup)
- : button_(button), state_(state), followup_(followup) {
-}
-
-ClickTask::~ClickTask() {}
-
-void ClickTask::Run() {
- if (followup_)
- SendMouseEventsNotifyWhenDone(button_, state_, followup_);
+void ClickTask(MouseButton button, int state, const base::Closure& followup) {
+ if (!followup.is_null())
+ SendMouseEventsNotifyWhenDone(button, state, followup);
else
- SendMouseEvents(button_, state_);
+ SendMouseEvents(button, state);
}
} // ui_controls

Powered by Google App Engine
This is Rietveld 408576698