| 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); | |
| 265 return window; | 264 return window; |
| 266 } | 265 } |
| 267 | 266 |
| 268 void AshTestBase::ParentWindowInPrimaryRootWindow(aura::Window* window) { | 267 void AshTestBase::ParentWindowInPrimaryRootWindow(aura::Window* window) { |
| 269 aura::client::ParentWindowWithContext( | 268 aura::client::ParentWindowWithContext( |
| 270 window, Shell::GetPrimaryRootWindow(), gfx::Rect()); | 269 window, Shell::GetPrimaryRootWindow(), gfx::Rect()); |
| 271 } | 270 } |
| 272 | 271 |
| 273 void AshTestBase::RunAllPendingInMessageLoop() { | 272 void AshTestBase::RunAllPendingInMessageLoop() { |
| 274 ash_test_helper_->RunAllPendingInMessageLoop(); | 273 ash_test_helper_->RunAllPendingInMessageLoop(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 330 |
| 332 void AshTestBase::UnblockUserSession() { | 331 void AshTestBase::UnblockUserSession() { |
| 333 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 332 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
| 334 SetSessionStarted(true); | 333 SetSessionStarted(true); |
| 335 SetUserAddingScreenRunning(false); | 334 SetUserAddingScreenRunning(false); |
| 336 } | 335 } |
| 337 | 336 |
| 338 | 337 |
| 339 } // namespace test | 338 } // namespace test |
| 340 } // namespace ash | 339 } // namespace ash |
| OLD | NEW |