| 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 "ash/test/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/display/extended_mouse_warp_controller.h" | 10 #include "ash/display/extended_mouse_warp_controller.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 ShellPort::Get() | 225 ShellPort::Get() |
| 226 ->GetPrimaryRootWindow() | 226 ->GetPrimaryRootWindow() |
| 227 ->GetRootWindowController() | 227 ->GetRootWindowController() |
| 228 ->ConfigureWidgetInitParamsForContainer(widget.get(), container_id, | 228 ->ConfigureWidgetInitParamsForContainer(widget.get(), container_id, |
| 229 ¶ms); | 229 ¶ms); |
| 230 widget->Init(params); | 230 widget->Init(params); |
| 231 widget->Show(); | 231 widget->Show(); |
| 232 return widget; | 232 return widget; |
| 233 } | 233 } |
| 234 | 234 |
| 235 std::unique_ptr<aura::Window> AshTestBase::CreateTestWindow( |
| 236 const gfx::Rect& bounds_in_screen, |
| 237 ui::wm::WindowType type, |
| 238 int shell_window_id) { |
| 239 return base::WrapUnique<aura::Window>( |
| 240 CreateTestWindowInShellWithDelegateAndType(nullptr, type, shell_window_id, |
| 241 bounds_in_screen)); |
| 242 } |
| 243 |
| 235 aura::Window* AshTestBase::CreateTestWindowInShellWithId(int id) { | 244 aura::Window* AshTestBase::CreateTestWindowInShellWithId(int id) { |
| 236 return CreateTestWindowInShellWithDelegate(NULL, id, gfx::Rect()); | 245 return CreateTestWindowInShellWithDelegate(NULL, id, gfx::Rect()); |
| 237 } | 246 } |
| 238 | 247 |
| 239 aura::Window* AshTestBase::CreateTestWindowInShellWithBounds( | 248 aura::Window* AshTestBase::CreateTestWindowInShellWithBounds( |
| 240 const gfx::Rect& bounds) { | 249 const gfx::Rect& bounds) { |
| 241 return CreateTestWindowInShellWithDelegate(NULL, 0, bounds); | 250 return CreateTestWindowInShellWithDelegate(NULL, 0, bounds); |
| 242 } | 251 } |
| 243 | 252 |
| 244 aura::Window* AshTestBase::CreateTestWindowInShell(SkColor color, | 253 aura::Window* AshTestBase::CreateTestWindowInShell(SkColor color, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 Shell::Get()->window_tree_host_manager()->SetPrimaryDisplayId( | 405 Shell::Get()->window_tree_host_manager()->SetPrimaryDisplayId( |
| 397 display_manager()->GetSecondaryDisplay().id()); | 406 display_manager()->GetSecondaryDisplay().id()); |
| 398 } | 407 } |
| 399 | 408 |
| 400 display::Display AshTestBase::GetSecondaryDisplay() { | 409 display::Display AshTestBase::GetSecondaryDisplay() { |
| 401 return ash_test_helper_->GetSecondaryDisplay(); | 410 return ash_test_helper_->GetSecondaryDisplay(); |
| 402 } | 411 } |
| 403 | 412 |
| 404 } // namespace test | 413 } // namespace test |
| 405 } // namespace ash | 414 } // namespace ash |
| OLD | NEW |