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

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

Issue 8212006: base::Bind: Cleanup in automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Linux test 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.h
diff --git a/chrome/browser/automation/ui_controls_internal.h b/chrome/browser/automation/ui_controls_internal.h
index 5ec9a81f574fc0a2675af6a5d05562bfe1c8be0f..e917992198a0dfa02723952e3a87c40e6783b10b 100644
--- a/chrome/browser/automation/ui_controls_internal.h
+++ b/chrome/browser/automation/ui_controls_internal.h
@@ -5,26 +5,19 @@
#ifndef CHROME_BROWSER_AUTOMATION_UI_CONTROLS_INTERNAL_H_
#define CHROME_BROWSER_AUTOMATION_UI_CONTROLS_INTERNAL_H_
-#include "base/task.h"
+#include "base/callback.h"
#include "chrome/browser/automation/ui_controls.h"
namespace ui_controls {
-// A utility class to send a mouse click event in a task.
-// It's shared by ui_controls_linux.cc and ui_controls_mac.cc
-class ClickTask : public Task {
- public:
- // A |followup| Task can be specified to notify the caller when the mouse
- // click event is sent. If can be NULL if the caller does not care about it.
- ClickTask(MouseButton button, int state, Task* followup);
- virtual ~ClickTask();
- virtual void Run();
-
- private:
- MouseButton button_;
- int state_;
- Task* followup_;
-};
+// A utility function to send a mouse click event in a closure. It's shared by
+// ui_controls_linux.cc and ui_controls_mac.cc
+void ClickTask(MouseButton button, int state, const base::Closure& followup) {
awong 2011/10/11 01:18:04 Don't inline this function?
James Hawkins 2011/10/11 21:11:22 Done.
+ if (!followup.is_null())
+ SendMouseEventsNotifyWhenDone(button, state, followup);
+ else
+ SendMouseEvents(button, state);
+}
} // namespace ui_controls

Powered by Google App Engine
This is Rietveld 408576698