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 "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "ui/base/test/ui_controls_internal_win.h" | 9 #include "ui/base/test/ui_controls_internal_win.h" |
10 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
12 | 12 |
13 namespace ui_controls { | 13 namespace ui_controls { |
14 bool g_ui_controls_enabled = false; | 14 bool g_ui_controls_enabled = false; |
15 | 15 |
16 void EnableUIControls() { | 16 void EnableUIControls() { |
17 g_ui_controls_enabled = true; | 17 g_ui_controls_enabled = true; |
18 } | 18 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 CHECK(g_ui_controls_enabled); | 66 CHECK(g_ui_controls_enabled); |
67 return internal::SendMouseEventsImpl(type, UP | DOWN, base::Closure()); | 67 return internal::SendMouseEventsImpl(type, UP | DOWN, base::Closure()); |
68 } | 68 } |
69 | 69 |
70 void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) { | 70 void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) { |
71 // On windows, posting UI events is synchronous so just post the closure. | 71 // On windows, posting UI events is synchronous so just post the closure. |
72 base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure); | 72 base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure); |
73 } | 73 } |
74 | 74 |
75 } // namespace ui_controls | 75 } // namespace ui_controls |
OLD | NEW |