Chromium Code Reviews| 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_converter.h" | 8 #include "ui/aura/mus/property_converter.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/test/test_window_delegate.h" | 11 #include "ui/aura/test/test_window_delegate.h" |
| 11 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 12 #include "ui/base/ime/input_method_initializer.h" | 13 #include "ui/base/ime/input_method_initializer.h" |
| 13 #include "ui/base/material_design/material_design_controller.h" | 14 #include "ui/base/material_design/material_design_controller.h" |
| 14 #include "ui/base/test/material_design_controller_test_api.h" | 15 #include "ui/base/test/material_design_controller_test_api.h" |
| 15 #include "ui/compositor/test/context_factories_for_test.h" | 16 #include "ui/compositor/test/context_factories_for_test.h" |
| 16 #include "ui/events/event_dispatcher.h" | 17 #include "ui/events/event_dispatcher.h" |
| 17 #include "ui/events/event_processor.h" | 18 #include "ui/events/event_processor.h" |
| 18 #include "ui/events/gesture_detection/gesture_configuration.h" | 19 #include "ui/events/gesture_detection/gesture_configuration.h" |
| 19 | 20 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 | 168 |
| 168 ui::mojom::WindowTreeClient* AuraTestBase::window_tree_client() { | 169 ui::mojom::WindowTreeClient* AuraTestBase::window_tree_client() { |
| 169 return helper_->window_tree_client(); | 170 return helper_->window_tree_client(); |
| 170 } | 171 } |
| 171 | 172 |
| 172 void AuraTestBase::SetPropertyConverter( | 173 void AuraTestBase::SetPropertyConverter( |
| 173 std::unique_ptr<PropertyConverter> helper) { | 174 std::unique_ptr<PropertyConverter> helper) { |
| 174 property_converter_ = std::move(helper); | 175 property_converter_ = std::move(helper); |
| 175 } | 176 } |
| 176 | 177 |
| 177 void AuraTestBase::OnEmbed(Window* root) {} | 178 void AuraTestBase::OnEmbed( |
| 179 std::unique_ptr<WindowTreeHostMus> window_tree_host) {} | |
| 178 | 180 |
| 179 void AuraTestBase::OnUnembed(Window* root) {} | 181 void AuraTestBase::OnUnembed(Window* root) {} |
| 180 | 182 |
| 181 void AuraTestBase::OnEmbedRootDestroyed(Window* root) {} | 183 void AuraTestBase::OnEmbedRootDestroyed(Window* root) {} |
| 182 | 184 |
| 183 void AuraTestBase::OnLostConnection(WindowTreeClient* client) {} | 185 void AuraTestBase::OnLostConnection(WindowTreeClient* client) {} |
| 184 | 186 |
| 185 void AuraTestBase::OnPointerEventObserved(const ui::PointerEvent& event, | 187 void AuraTestBase::OnPointerEventObserved(const ui::PointerEvent& event, |
| 186 Window* target) {} | 188 Window* target) {} |
| 187 | 189 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 200 | 202 |
| 201 Window* AuraTestBase::OnWmCreateTopLevelWindow( | 203 Window* AuraTestBase::OnWmCreateTopLevelWindow( |
| 202 std::map<std::string, std::vector<uint8_t>>* properties) { | 204 std::map<std::string, std::vector<uint8_t>>* properties) { |
| 203 return new Window(nullptr); | 205 return new Window(nullptr); |
| 204 } | 206 } |
| 205 | 207 |
| 206 void AuraTestBase::OnWmClientJankinessChanged( | 208 void AuraTestBase::OnWmClientJankinessChanged( |
| 207 const std::set<Window*>& client_windows, | 209 const std::set<Window*>& client_windows, |
| 208 bool janky) {} | 210 bool janky) {} |
| 209 | 211 |
| 210 void AuraTestBase::OnWmNewDisplay(Window* window, | 212 void AuraTestBase::OnWmNewDisplay( |
| 211 const display::Display& display) {} | 213 std::unique_ptr<WindowTreeHostMus> window_tree_host, |
| 214 const display::Display& display) {} | |
|
sadrul
2016/11/02 16:03:04
Is it OK to not keep the WTHMus alive?
sky
2016/11/02 16:53:23
It should be fine. But I'm assuming when a test wa
| |
| 212 | 215 |
| 213 void AuraTestBase::OnWmDisplayRemoved(Window* window) {} | 216 void AuraTestBase::OnWmDisplayRemoved(Window* window) {} |
| 214 | 217 |
| 215 void AuraTestBase::OnWmDisplayModified(const display::Display& display) {} | 218 void AuraTestBase::OnWmDisplayModified(const display::Display& display) {} |
| 216 | 219 |
| 217 ui::mojom::EventResult AuraTestBase::OnAccelerator(uint32_t id, | 220 ui::mojom::EventResult AuraTestBase::OnAccelerator(uint32_t id, |
| 218 const ui::Event& event) { | 221 const ui::Event& event) { |
| 219 return ui::mojom::EventResult::HANDLED; | 222 return ui::mojom::EventResult::HANDLED; |
| 220 } | 223 } |
| 221 | 224 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 247 | 250 |
| 248 void AuraTestBaseWithType::SetUp() { | 251 void AuraTestBaseWithType::SetUp() { |
| 249 DCHECK(!setup_called_); | 252 DCHECK(!setup_called_); |
| 250 setup_called_ = true; | 253 setup_called_ = true; |
| 251 ConfigureBackend(GetParam()); | 254 ConfigureBackend(GetParam()); |
| 252 AuraTestBase::SetUp(); | 255 AuraTestBase::SetUp(); |
| 253 } | 256 } |
| 254 | 257 |
| 255 } // namespace test | 258 } // namespace test |
| 256 } // namespace aura | 259 } // namespace aura |
| OLD | NEW |