OLD | NEW |
1 // Copyright (c) 2009 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 <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
8 #include <gdk/gdkkeysyms.h> | |
9 | 9 |
10 #include "app/event_synthesis_gtk.h" | 10 #include "app/event_synthesis_gtk.h" |
11 #include "gfx/rect.h" | |
12 #include "base/logging.h" | 11 #include "base/logging.h" |
13 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
14 #include "chrome/browser/automation/ui_controls_internal.h" | 13 #include "chrome/browser/automation/ui_controls_internal.h" |
15 #include "chrome/browser/gtk/gtk_util.h" | 14 #include "chrome/browser/ui/gtk/gtk_util.h" |
16 #include "chrome/common/automation_constants.h" | 15 #include "chrome/common/automation_constants.h" |
| 16 #include "gfx/rect.h" |
17 | 17 |
18 #if defined(TOOLKIT_VIEWS) | 18 #if defined(TOOLKIT_VIEWS) |
19 #include "views/view.h" | 19 #include "views/view.h" |
20 #include "views/widget/widget.h" | 20 #include "views/widget/widget.h" |
21 #endif | 21 #endif |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 class EventWaiter : public MessageLoopForUI::Observer { | 25 class EventWaiter : public MessageLoopForUI::Observer { |
26 public: | 26 public: |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 int state, | 259 int state, |
260 Task* task) { | 260 Task* task) { |
261 gfx::Rect bounds = gtk_util::GetWidgetScreenBounds(widget); | 261 gfx::Rect bounds = gtk_util::GetWidgetScreenBounds(widget); |
262 SendMouseMoveNotifyWhenDone(bounds.x() + bounds.width() / 2, | 262 SendMouseMoveNotifyWhenDone(bounds.x() + bounds.width() / 2, |
263 bounds.y() + bounds.height() / 2, | 263 bounds.y() + bounds.height() / 2, |
264 new ClickTask(button, state, task)); | 264 new ClickTask(button, state, task)); |
265 } | 265 } |
266 #endif | 266 #endif |
267 | 267 |
268 } // namespace ui_controls | 268 } // namespace ui_controls |
OLD | NEW |