| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 base::CreateDirectory(wallpaper_path.DirName()); | 112 base::CreateDirectory(wallpaper_path.DirName()); |
| 113 | 113 |
| 114 return wallpaper_path; | 114 return wallpaper_path; |
| 115 } | 115 } |
| 116 | 116 |
| 117 // Logs in |account_id|. | 117 // Logs in |account_id|. |
| 118 void LogIn(const AccountId& account_id, const std::string& user_id_hash) { | 118 void LogIn(const AccountId& account_id, const std::string& user_id_hash) { |
| 119 SessionManager::Get()->CreateSession(account_id, user_id_hash); | 119 SessionManager::Get()->CreateSession(account_id, user_id_hash); |
| 120 // Adding a secondary display creates a shelf on that display, which | 120 // Adding a secondary display creates a shelf on that display, which |
| 121 // assumes a shelf on the primary display if the user was logged in. | 121 // assumes a shelf on the primary display if the user was logged in. |
| 122 ash::WmShell::Get()->CreateShelf(); | 122 ash::WmShell::Get()->CreateShelfView(); |
| 123 WaitAsyncWallpaperLoadStarted(); | 123 WaitAsyncWallpaperLoadStarted(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 // Logs in |account_id| and sets it as child account. | 126 // Logs in |account_id| and sets it as child account. |
| 127 void LogInAsChild(const AccountId& account_id, | 127 void LogInAsChild(const AccountId& account_id, |
| 128 const std::string& user_id_hash) { | 128 const std::string& user_id_hash) { |
| 129 SessionManager::Get()->CreateSession(account_id, user_id_hash); | 129 SessionManager::Get()->CreateSession(account_id, user_id_hash); |
| 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); |
| 132 user_manager::UserManager::Get()->ChangeUserChildStatus( | 132 user_manager::UserManager::Get()->ChangeUserChildStatus( |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 | 840 |
| 841 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); | 841 WallpaperManager::Get()->SetDefaultWallpaperNow(EmptyAccountId()); |
| 842 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); | 842 wallpaper_manager_test_utils::WaitAsyncWallpaperLoadFinished(); |
| 843 | 843 |
| 844 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( | 844 EXPECT_TRUE(wallpaper_manager_test_utils::ImageIsNearColor( |
| 845 controller_->GetWallpaper(), | 845 controller_->GetWallpaper(), |
| 846 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); | 846 wallpaper_manager_test_utils::kSmallDefaultWallpaperColor)); |
| 847 } | 847 } |
| 848 | 848 |
| 849 } // namespace chromeos | 849 } // namespace chromeos |
| OLD | NEW |