| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 5 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "ash/common/wallpaper/wallpaper_controller.h" | 9 #include "ash/common/wallpaper/wallpaper_controller.h" |
| 10 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 return wallpaper_path; | 112 return wallpaper_path; |
| 113 } | 113 } |
| 114 | 114 |
| 115 // Logs in |account_id|. | 115 // Logs in |account_id|. |
| 116 void LogIn(const AccountId& account_id, const std::string& user_id_hash) { | 116 void LogIn(const AccountId& account_id, const std::string& user_id_hash) { |
| 117 user_manager::UserManager::Get()->UserLoggedIn(account_id, user_id_hash, | 117 user_manager::UserManager::Get()->UserLoggedIn(account_id, user_id_hash, |
| 118 false); | 118 false); |
| 119 // Adding a secondary display creates a shelf on that display, which | 119 // Adding a secondary display creates a shelf on that display, which |
| 120 // assumes a shelf on the primary display if the user was logged in. | 120 // assumes a shelf on the primary display if the user was logged in. |
| 121 ash::Shell::GetInstance()->CreateShelf(); | 121 ash::WmShell::Get()->CreateShelf(); |
| 122 WaitAsyncWallpaperLoadStarted(); | 122 WaitAsyncWallpaperLoadStarted(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 // Logs in |account_id| and sets it as child account. | 125 // Logs in |account_id| and sets it as child account. |
| 126 void LogInAsChild(const AccountId& account_id, | 126 void LogInAsChild(const AccountId& account_id, |
| 127 const std::string& user_id_hash) { | 127 const std::string& user_id_hash) { |
| 128 user_manager::UserManager::Get()->UserLoggedIn(account_id, user_id_hash, | 128 user_manager::UserManager::Get()->UserLoggedIn(account_id, user_id_hash, |
| 129 false); | 129 false); |
| 130 user_manager::User* user = | 130 user_manager::User* user = |
| 131 user_manager::UserManager::Get()->FindUserAndModify(account_id); | 131 user_manager::UserManager::Get()->FindUserAndModify(account_id); |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 | 845 |
| 846 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); | 846 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); |
| 847 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 847 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
| 848 | 848 |
| 849 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 849 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
| 850 controller_->GetWallpaper(), | 850 controller_->GetWallpaper(), |
| 851 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); | 851 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); |
| 852 } | 852 } |
| 853 | 853 |
| 854 } // namespace chromeos | 854 } // namespace chromeos |
| OLD | NEW |