OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/aura/test/aura_test_base.h" | 5 #include "ui/aura/test/aura_test_base.h" |
6 | 6 |
7 #include "ui/aura/client/window_tree_client.h" | 7 #include "ui/aura/client/window_tree_client.h" |
8 #include "ui/aura/root_window.h" | 8 #include "ui/aura/root_window.h" |
9 #include "ui/aura/test/aura_test_helper.h" | 9 #include "ui/aura/test/aura_test_helper.h" |
10 #include "ui/aura/test/test_window_delegate.h" | 10 #include "ui/aura/test/test_window_delegate.h" |
11 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
12 #include "ui/base/ime/input_method_initializer.h" | 12 #include "ui/base/ime/input_method_initializer.h" |
| 13 #include "ui/events/event_dispatcher.h" |
13 #include "ui/events/gestures/gesture_configuration.h" | 14 #include "ui/events/gestures/gesture_configuration.h" |
14 | 15 |
15 namespace aura { | 16 namespace aura { |
16 namespace test { | 17 namespace test { |
17 | 18 |
18 AuraTestBase::AuraTestBase() | 19 AuraTestBase::AuraTestBase() |
19 : setup_called_(false), | 20 : setup_called_(false), |
20 teardown_called_(false) { | 21 teardown_called_(false) { |
21 } | 22 } |
22 | 23 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } | 100 } |
100 | 101 |
101 void AuraTestBase::RunAllPendingInMessageLoop() { | 102 void AuraTestBase::RunAllPendingInMessageLoop() { |
102 helper_->RunAllPendingInMessageLoop(); | 103 helper_->RunAllPendingInMessageLoop(); |
103 } | 104 } |
104 | 105 |
105 void AuraTestBase::ParentWindow(Window* window) { | 106 void AuraTestBase::ParentWindow(Window* window) { |
106 client::ParentWindowWithContext(window, root_window(), gfx::Rect()); | 107 client::ParentWindowWithContext(window, root_window(), gfx::Rect()); |
107 } | 108 } |
108 | 109 |
| 110 bool AuraTestBase::DispatchEventUsingWindowDispatcher(ui::Event* event) { |
| 111 ui::EventDispatchDetails details = dispatcher()->OnEventFromSource(event); |
| 112 CHECK(!details.dispatcher_destroyed); |
| 113 return event->handled(); |
| 114 } |
| 115 |
109 } // namespace test | 116 } // namespace test |
110 } // namespace aura | 117 } // namespace aura |
OLD | NEW |