OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/base/test/ui_controls.h" | 5 #include "ui/base/test/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" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "ui/base/gtk/event_synthesis_gtk.h" | 13 #include "ui/base/gtk/event_synthesis_gtk.h" |
14 #include "ui/base/gtk/gtk_screen_util.h" | 14 #include "ui/base/gtk/gtk_screen_util.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 bool g_ui_controls_enabled = false; | 18 bool g_ui_controls_enabled = false; |
19 | 19 |
20 // static | 20 // static |
21 guint32 XTimeNow() { | 21 guint32 XTimeNow() { |
22 struct timespec ts; | 22 struct timespec ts; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 new EventWaiter(task, wait_type, 1); | 252 new EventWaiter(task, wait_type, 1); |
253 return rv; | 253 return rv; |
254 } | 254 } |
255 | 255 |
256 bool SendMouseClick(MouseButton type) { | 256 bool SendMouseClick(MouseButton type) { |
257 CHECK(g_ui_controls_enabled); | 257 CHECK(g_ui_controls_enabled); |
258 return SendMouseEvents(type, UP | DOWN); | 258 return SendMouseEvents(type, UP | DOWN); |
259 } | 259 } |
260 | 260 |
261 } // namespace ui_controls | 261 } // namespace ui_controls |
OLD | NEW |