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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 const gfx::Rect& bounds) { | 234 const gfx::Rect& bounds) { |
235 return CreateTestWindowInShellWithDelegate( | 235 return CreateTestWindowInShellWithDelegate( |
236 new aura::test::ColorTestWindowDelegate(color), id, bounds); | 236 new aura::test::ColorTestWindowDelegate(color), id, bounds); |
237 } | 237 } |
238 | 238 |
239 aura::Window* AshTestBase::CreateTestWindowInShellWithDelegate( | 239 aura::Window* AshTestBase::CreateTestWindowInShellWithDelegate( |
240 aura::WindowDelegate* delegate, | 240 aura::WindowDelegate* delegate, |
241 int id, | 241 int id, |
242 const gfx::Rect& bounds) { | 242 const gfx::Rect& bounds) { |
243 return CreateTestWindowInShellWithDelegateAndType( | 243 return CreateTestWindowInShellWithDelegateAndType( |
244 delegate, | 244 delegate, ui::wm::WINDOW_TYPE_NORMAL, id, bounds); |
245 aura::client::WINDOW_TYPE_NORMAL, | |
246 id, | |
247 bounds); | |
248 } | 245 } |
249 | 246 |
250 aura::Window* AshTestBase::CreateTestWindowInShellWithDelegateAndType( | 247 aura::Window* AshTestBase::CreateTestWindowInShellWithDelegateAndType( |
251 aura::WindowDelegate* delegate, | 248 aura::WindowDelegate* delegate, |
252 aura::client::WindowType type, | 249 ui::wm::WindowType type, |
253 int id, | 250 int id, |
254 const gfx::Rect& bounds) { | 251 const gfx::Rect& bounds) { |
255 aura::Window* window = new aura::Window(delegate); | 252 aura::Window* window = new aura::Window(delegate); |
256 window->set_id(id); | 253 window->set_id(id); |
257 window->SetType(type); | 254 window->SetType(type); |
258 window->Init(ui::LAYER_TEXTURED); | 255 window->Init(ui::LAYER_TEXTURED); |
259 window->Show(); | 256 window->Show(); |
260 | 257 |
261 if (bounds.IsEmpty()) { | 258 if (bounds.IsEmpty()) { |
262 ParentWindowInPrimaryRootWindow(window); | 259 ParentWindowInPrimaryRootWindow(window); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 337 |
341 void AshTestBase::UnblockUserSession() { | 338 void AshTestBase::UnblockUserSession() { |
342 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 339 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
343 SetSessionStarted(true); | 340 SetSessionStarted(true); |
344 SetUserAddingScreenRunning(false); | 341 SetUserAddingScreenRunning(false); |
345 } | 342 } |
346 | 343 |
347 | 344 |
348 } // namespace test | 345 } // namespace test |
349 } // namespace ash | 346 } // namespace ash |
OLD | NEW |