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

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

Issue 8212006: base::Bind: Cleanup in automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index ac2e654e0c272f2441154836b212bda54d5fe25d..58a04741f2109e7b289ffce7f17fd92bf98a8d0e 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -216,8 +216,9 @@ void TestingAutomationProvider::OnBrowserRemoved(const Browser* browser) {
switches::kKeepAliveForTest)) {
// If you change this, update Observer for chrome::SESSION_END
// below.
- MessageLoop::current()->PostTask(FROM_HERE,
- NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider));
+ MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&TestingAutomationProvider::OnRemoveProvider, this));
}
}
@@ -876,7 +877,7 @@ void TestingAutomationProvider::WindowSimulateClick(const IPC::Message& message,
if (window_tracker_->ContainsHandle(handle)) {
// TODO(phajdan.jr): This is flaky. We should wait for the final click.
ui_controls::SendMouseMoveNotifyWhenDone(
- click.x(), click.y(), NewRunnableFunction(&SendMouseClick, flags));
+ click.x(), click.y(), base::Bind(&SendMouseClick, flags));
}
}
@@ -5542,8 +5543,8 @@ void TestingAutomationProvider::SendOSLevelKeyEventToTab(
if (!ui_controls::SendKeyPressNotifyWhenDone(
window, static_cast<ui::KeyboardCode>(keycode),
control, shift, alt, meta,
- NewRunnableMethod(this,
- &TestingAutomationProvider::SendSuccessReply, reply_message))) {
+ base::Bind(&TestingAutomationProvider::SendSuccessReply, this,
+ reply_message))) {
AutomationJSONReply(this, reply_message)
.SendError("Could not send the native key event");
}

Powered by Google App Engine
This is Rietveld 408576698