Index: chrome/browser/automation/ui_controls_aurawin.cc |
diff --git a/chrome/browser/automation/ui_controls_aurawin.cc b/chrome/browser/automation/ui_controls_aurawin.cc |
index 50e5f874ed99f39a5ccf54c75123a79130e30d13..31c92b48861c67e5fc2183dcf00d9e4fbc08293f 100644 |
--- a/chrome/browser/automation/ui_controls_aurawin.cc |
+++ b/chrome/browser/automation/ui_controls_aurawin.cc |
@@ -5,6 +5,7 @@ |
#include "chrome/browser/automation/ui_controls.h" |
#include "base/logging.h" |
+#include "base/message_loop.h" |
#include "chrome/browser/automation/ui_controls_internal.h" |
#include "ui/aura/desktop.h" |
#include "ui/views/view.h" |
@@ -69,4 +70,9 @@ void MoveMouseToCenterAndPress(views::View* view, |
SendMouseEventsNotifyWhenDone(button, state, task); |
} |
+void RunClosureAfterAllPendingUIEvents(const base::Closure& task) { |
+ // On windows, posting UI events is synchronous so just post the closure. |
+ MessageLoopForUI::current()->PostTask(FROM_HERE, task); |
+} |
+ |
} // namespace ui_controls |