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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/single_thread_task_runner.h" |
8 #include "ui/aura/test/ui_controls_factory_aura.h" | 9 #include "ui/aura/test/ui_controls_factory_aura.h" |
9 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
10 #include "ui/aura/window_tree_host.h" | 11 #include "ui/aura/window_tree_host.h" |
11 #include "ui/base/test/ui_controls_aura.h" | 12 #include "ui/base/test/ui_controls_aura.h" |
12 #include "ui/base/test/ui_controls_internal_win.h" | 13 #include "ui/base/test/ui_controls_internal_win.h" |
13 | 14 |
14 namespace aura { | 15 namespace aura { |
15 namespace test { | 16 namespace test { |
16 | 17 |
17 namespace { | 18 namespace { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 int state, | 70 int state, |
70 const base::Closure& task) override { | 71 const base::Closure& task) override { |
71 return SendMouseEventsImpl(type, state, task); | 72 return SendMouseEventsImpl(type, state, task); |
72 } | 73 } |
73 bool SendMouseClick(MouseButton type) override { | 74 bool SendMouseClick(MouseButton type) override { |
74 return SendMouseEvents(type, UP | DOWN); | 75 return SendMouseEvents(type, UP | DOWN); |
75 } | 76 } |
76 void RunClosureAfterAllPendingUIEvents( | 77 void RunClosureAfterAllPendingUIEvents( |
77 const base::Closure& closure) override { | 78 const base::Closure& closure) override { |
78 // On windows, posting UI events is synchronous so just post the closure. | 79 // On windows, posting UI events is synchronous so just post the closure. |
79 base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure); | 80 base::MessageLoopForUI::current()->task_runner()->PostTask(FROM_HERE, |
| 81 closure); |
80 } | 82 } |
81 | 83 |
82 private: | 84 private: |
83 DISALLOW_COPY_AND_ASSIGN(UIControlsWin); | 85 DISALLOW_COPY_AND_ASSIGN(UIControlsWin); |
84 }; | 86 }; |
85 | 87 |
86 } // namespace | 88 } // namespace |
87 | 89 |
88 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { | 90 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { |
89 return new UIControlsWin(); | 91 return new UIControlsWin(); |
90 } | 92 } |
91 | 93 |
92 } // namespace test | 94 } // namespace test |
93 } // namespace aura | 95 } // namespace aura |
OLD | NEW |