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

Side by Side Diff: chrome/browser/automation/ui_controls_gtk.cc

Issue 8820010: Revert 113183 - Revert 113177 - process all ui events before posting closure because menu depends... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/automation/ui_controls.h" 5 #include "chrome/browser/automation/ui_controls.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 int state, 303 int state,
304 const base::Closure& task) { 304 const base::Closure& task) {
305 gfx::Rect bounds = gtk_util::GetWidgetScreenBounds(widget); 305 gfx::Rect bounds = gtk_util::GetWidgetScreenBounds(widget);
306 SendMouseMoveNotifyWhenDone( 306 SendMouseMoveNotifyWhenDone(
307 bounds.x() + bounds.width() / 2, 307 bounds.x() + bounds.width() / 2,
308 bounds.y() + bounds.height() / 2, 308 bounds.y() + bounds.height() / 2,
309 base::Bind(&ui_controls::internal::ClickTask, button, state, task)); 309 base::Bind(&ui_controls::internal::ClickTask, button, state, task));
310 } 310 }
311 #endif 311 #endif
312 312
313 #if defined(TOOLKIT_VIEWS)
314 void RunClosureAfterAllPendingUIEvents(const base::Closure& task) {
315 // Send noop event and run task.
316 int x, y;
317 gdk_window_at_pointer(&x, &y);
318 SendMouseMoveNotifyWhenDone(x, y, task);
319 }
320 #endif
321
313 } // namespace ui_controls 322 } // namespace ui_controls
OLDNEW
« no previous file with comments | « chrome/browser/automation/ui_controls_aurax11.cc ('k') | chrome/browser/automation/ui_controls_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698