| 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_parenting_client.h" | 7 #include "ui/aura/client/window_parenting_client.h" |
| 8 #include "ui/aura/mus/property_utils.h" | 8 #include "ui/aura/mus/property_utils.h" |
| 9 #include "ui/aura/mus/window_tree_client.h" | 9 #include "ui/aura/mus/window_tree_client.h" |
| 10 #include "ui/aura/mus/window_tree_host_mus.h" | 10 #include "ui/aura/mus/window_tree_host_mus.h" |
| 11 #include "ui/aura/test/test_window_delegate.h" | 11 #include "ui/aura/test/test_window_delegate.h" |
| 12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 13 #include "ui/base/ime/input_method_initializer.h" | 13 #include "ui/base/ime/input_method_initializer.h" |
| 14 #include "ui/base/material_design/material_design_controller.h" | 14 #include "ui/base/material_design/material_design_controller.h" |
| 15 #include "ui/base/test/material_design_controller_test_api.h" | 15 #include "ui/base/test/material_design_controller_test_api.h" |
| 16 #include "ui/compositor/test/context_factories_for_test.h" | 16 #include "ui/compositor/test/context_factories_for_test.h" |
| 17 #include "ui/events/event_dispatcher.h" | 17 #include "ui/events/event_dispatcher.h" |
| 18 #include "ui/events/event_processor.h" | 18 #include "ui/events/event_sink.h" |
| 19 #include "ui/events/gesture_detection/gesture_configuration.h" | 19 #include "ui/events/gesture_detection/gesture_configuration.h" |
| 20 | 20 |
| 21 namespace aura { | 21 namespace aura { |
| 22 namespace test { | 22 namespace test { |
| 23 | 23 |
| 24 AuraTestBase::AuraTestBase() | 24 AuraTestBase::AuraTestBase() |
| 25 : window_manager_delegate_(this), window_tree_client_delegate_(this) {} | 25 : window_manager_delegate_(this), window_tree_client_delegate_(this) {} |
| 26 | 26 |
| 27 AuraTestBase::~AuraTestBase() { | 27 AuraTestBase::~AuraTestBase() { |
| 28 CHECK(setup_called_) | 28 CHECK(setup_called_) |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 void AuraTestBase::RunAllPendingInMessageLoop() { | 128 void AuraTestBase::RunAllPendingInMessageLoop() { |
| 129 helper_->RunAllPendingInMessageLoop(); | 129 helper_->RunAllPendingInMessageLoop(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void AuraTestBase::ParentWindow(Window* window) { | 132 void AuraTestBase::ParentWindow(Window* window) { |
| 133 client::ParentWindowWithContext(window, root_window(), gfx::Rect()); | 133 client::ParentWindowWithContext(window, root_window(), gfx::Rect()); |
| 134 } | 134 } |
| 135 | 135 |
| 136 bool AuraTestBase::DispatchEventUsingWindowDispatcher(ui::Event* event) { | 136 bool AuraTestBase::DispatchEventUsingWindowDispatcher(ui::Event* event) { |
| 137 ui::EventDispatchDetails details = | 137 ui::EventDispatchDetails details = event_sink()->OnEventFromSource(event); |
| 138 event_processor()->OnEventFromSource(event); | |
| 139 CHECK(!details.dispatcher_destroyed); | 138 CHECK(!details.dispatcher_destroyed); |
| 140 return event->handled(); | 139 return event->handled(); |
| 141 } | 140 } |
| 142 | 141 |
| 143 ui::mojom::WindowTreeClient* AuraTestBase::window_tree_client() { | 142 ui::mojom::WindowTreeClient* AuraTestBase::window_tree_client() { |
| 144 return helper_->window_tree_client(); | 143 return helper_->window_tree_client(); |
| 145 } | 144 } |
| 146 | 145 |
| 147 void AuraTestBase::OnEmbed( | 146 void AuraTestBase::OnEmbed( |
| 148 std::unique_ptr<WindowTreeHostMus> window_tree_host) {} | 147 std::unique_ptr<WindowTreeHostMus> window_tree_host) {} |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 250 |
| 252 AuraTestBaseMus::~AuraTestBaseMus() {} | 251 AuraTestBaseMus::~AuraTestBaseMus() {} |
| 253 | 252 |
| 254 void AuraTestBaseMus::SetUp() { | 253 void AuraTestBaseMus::SetUp() { |
| 255 ConfigureBackend(test::BackendType::MUS); | 254 ConfigureBackend(test::BackendType::MUS); |
| 256 AuraTestBase::SetUp(); | 255 AuraTestBase::SetUp(); |
| 257 } | 256 } |
| 258 | 257 |
| 259 } // namespace test | 258 } // namespace test |
| 260 } // namespace aura | 259 } // namespace aura |
| OLD | NEW |