| 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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 gfx::Display display = | 254 gfx::Display display = |
| 255 Shell::GetScreen()->GetDisplayMatching(bounds); | 255 Shell::GetScreen()->GetDisplayMatching(bounds); |
| 256 aura::Window* root = ash::Shell::GetInstance()->display_controller()-> | 256 aura::Window* root = ash::Shell::GetInstance()->display_controller()-> |
| 257 GetRootWindowForDisplayId(display.id()); | 257 GetRootWindowForDisplayId(display.id()); |
| 258 gfx::Point origin = bounds.origin(); | 258 gfx::Point origin = bounds.origin(); |
| 259 ::wm::ConvertPointFromScreen(root, &origin); | 259 ::wm::ConvertPointFromScreen(root, &origin); |
| 260 window->SetBounds(gfx::Rect(origin, bounds.size())); | 260 window->SetBounds(gfx::Rect(origin, bounds.size())); |
| 261 aura::client::ParentWindowWithContext(window, root, bounds); | 261 aura::client::ParentWindowWithContext(window, root, bounds); |
| 262 } | 262 } |
| 263 window->SetProperty(aura::client::kCanMaximizeKey, true); | 263 window->SetProperty(aura::client::kCanMaximizeKey, true); |
| 264 window->SetProperty(aura::client::kCanMinimizeKey, true); |
| 264 return window; | 265 return window; |
| 265 } | 266 } |
| 266 | 267 |
| 267 void AshTestBase::ParentWindowInPrimaryRootWindow(aura::Window* window) { | 268 void AshTestBase::ParentWindowInPrimaryRootWindow(aura::Window* window) { |
| 268 aura::client::ParentWindowWithContext( | 269 aura::client::ParentWindowWithContext( |
| 269 window, Shell::GetPrimaryRootWindow(), gfx::Rect()); | 270 window, Shell::GetPrimaryRootWindow(), gfx::Rect()); |
| 270 } | 271 } |
| 271 | 272 |
| 272 void AshTestBase::RunAllPendingInMessageLoop() { | 273 void AshTestBase::RunAllPendingInMessageLoop() { |
| 273 ash_test_helper_->RunAllPendingInMessageLoop(); | 274 ash_test_helper_->RunAllPendingInMessageLoop(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 331 |
| 331 void AshTestBase::UnblockUserSession() { | 332 void AshTestBase::UnblockUserSession() { |
| 332 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 333 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
| 333 SetSessionStarted(true); | 334 SetSessionStarted(true); |
| 334 SetUserAddingScreenRunning(false); | 335 SetUserAddingScreenRunning(false); |
| 335 } | 336 } |
| 336 | 337 |
| 337 | 338 |
| 338 } // namespace test | 339 } // namespace test |
| 339 } // namespace ash | 340 } // namespace ash |
| OLD | NEW |