| 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 "base/single_thread_task_runner.h" |
| 9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "ui/aura/test/ui_controls_factory_aura.h" | 10 #include "ui/aura/test/ui_controls_factory_aura.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return SendMouseEventsImpl(type, state, base::Closure()); | 68 return SendMouseEventsImpl(type, state, base::Closure()); |
| 69 } | 69 } |
| 70 bool SendMouseEventsNotifyWhenDone(MouseButton type, | 70 bool SendMouseEventsNotifyWhenDone(MouseButton type, |
| 71 int state, | 71 int state, |
| 72 const base::Closure& task) override { | 72 const base::Closure& task) override { |
| 73 return SendMouseEventsImpl(type, state, task); | 73 return SendMouseEventsImpl(type, state, task); |
| 74 } | 74 } |
| 75 bool SendMouseClick(MouseButton type) override { | 75 bool SendMouseClick(MouseButton type) override { |
| 76 return SendMouseEvents(type, UP | DOWN); | 76 return SendMouseEvents(type, UP | DOWN); |
| 77 } | 77 } |
| 78 bool SendTouchEvents(int action, int num, int x, int y) override { |
| 79 return SendTouchEventsImpl(action, num, x, y, base::Closure()); |
| 80 } |
| 81 bool SendTouchEventsNotifyWhenDone(int action, |
| 82 int num, |
| 83 int x, |
| 84 int y, |
| 85 const base::Closure& task) override { |
| 86 return SendTouchEventsImpl(action, num, x, y, task); |
| 87 } |
| 78 void RunClosureAfterAllPendingUIEvents( | 88 void RunClosureAfterAllPendingUIEvents( |
| 79 const base::Closure& closure) override { | 89 const base::Closure& closure) override { |
| 80 // On windows, posting UI events is synchronous so just post the closure. | 90 // On windows, posting UI events is synchronous so just post the closure. |
| 81 DCHECK(base::MessageLoopForUI::IsCurrent()); | 91 DCHECK(base::MessageLoopForUI::IsCurrent()); |
| 82 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure); | 92 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure); |
| 83 } | 93 } |
| 84 | 94 |
| 85 private: | 95 private: |
| 86 DISALLOW_COPY_AND_ASSIGN(UIControlsWin); | 96 DISALLOW_COPY_AND_ASSIGN(UIControlsWin); |
| 87 }; | 97 }; |
| 88 | 98 |
| 89 } // namespace | 99 } // namespace |
| 90 | 100 |
| 91 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { | 101 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { |
| 92 return new UIControlsWin(); | 102 return new UIControlsWin(); |
| 93 } | 103 } |
| 94 | 104 |
| 95 } // namespace test | 105 } // namespace test |
| 96 } // namespace aura | 106 } // namespace aura |
| OLD | NEW |