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

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

Issue 8212006: base::Bind: Cleanup in automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac build fix. 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.h
diff --git a/chrome/browser/automation/ui_controls.h b/chrome/browser/automation/ui_controls.h
index 7d7b0bfa0dad7dbce2e6fab7a65788ad8ae51123..210dfec691419514fbb235461798a0e4223f02f5 100644
--- a/chrome/browser/automation/ui_controls.h
+++ b/chrome/browser/automation/ui_controls.h
@@ -12,6 +12,7 @@
#include <wtypes.h>
#endif
+#include "base/callback.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
@@ -22,16 +23,14 @@ class View;
}
#endif
-class Task;
-
namespace ui_controls {
-// Many of the functions in this class include a variant that takes a Task.
-// The version that takes a Task waits until the generated event is processed.
-// Once the generated event is processed the Task is Run (and deleted). Note
-// that this is a somewhat fragile process in that any event of the correct
-// type (key down, mouse click, etc.) will trigger the Task to be run. Hence
-// a usage such as
+// Many of the functions in this class include a variant that takes a Closure.
+// The version that takes a Closure waits until the generated event is
+// processed. Once the generated event is processed the Closure is Run (and
+// deleted). Note that this is a somewhat fragile process in that any event of
+// the correct type (key down, mouse click, etc.) will trigger the Closure to be
+// run. Hence a usage such as
//
// SendKeyPress(...);
// SendKeyPressNotifyWhenDone(..., task);
@@ -57,11 +56,11 @@ bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
bool shift,
bool alt,
bool command,
- Task* task);
+ const base::Closure& task);
// Simulate a mouse move. (x,y) are absolute screen coordinates.
bool SendMouseMove(long x, long y);
-bool SendMouseMoveNotifyWhenDone(long x, long y, Task* task);
+bool SendMouseMoveNotifyWhenDone(long x, long y, const base::Closure& task);
enum MouseButton {
LEFT = 0,
@@ -79,7 +78,8 @@ enum MouseButtonState {
// the cursor currently is, so be sure to move the cursor before calling this
// (and be sure the cursor has arrived!).
bool SendMouseEvents(MouseButton type, int state);
-bool SendMouseEventsNotifyWhenDone(MouseButton type, int state, Task* task);
+bool SendMouseEventsNotifyWhenDone(MouseButton type, int state,
+ const base::Closure& task);
// Same as SendMouseEvents with UP | DOWN.
bool SendMouseClick(MouseButton type);
@@ -95,7 +95,7 @@ void MoveMouseToCenterAndPress(
#endif
MouseButton button,
int state,
- Task* task);
+ const base::Closure& task);
} // ui_controls
« no previous file with comments | « chrome/browser/automation/testing_automation_provider_views.cc ('k') | chrome/browser/automation/ui_controls_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698