Index: chrome/browser/automation/ui_controls_gtk.cc |
diff --git a/chrome/browser/automation/ui_controls_gtk.cc b/chrome/browser/automation/ui_controls_gtk.cc |
index 32e31007ee601fd9b4757592318f0960bcc4574b..8826609eaab1b6024c99bf6f499f0e7dde349966 100644 |
--- a/chrome/browser/automation/ui_controls_gtk.cc |
+++ b/chrome/browser/automation/ui_controls_gtk.cc |
@@ -310,4 +310,13 @@ void MoveMouseToCenterAndPress(GtkWidget* widget, |
} |
#endif |
+#if defined(TOOLKIT_VIEWS) |
+void RunClosureAfterAllPendingUIEvents(const base::Closure& task) { |
+ // Send noop event and run task. |
+ int x, y; |
+ gdk_window_at_pointer(&x, &y); |
+ SendMouseMoveNotifyWhenDone(x, y, task); |
+} |
+#endif |
+ |
} // namespace ui_controls |