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

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: Mac build 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/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 4c0a5234203e7f3754672852d52da22f3777584d..26a00b1feb63d6a1924c0ca177cdbaaefe87f7b2 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -214,8 +214,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));
}
}
@@ -872,7 +873,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));
}
}
@@ -5523,8 +5524,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