| 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 #ifndef COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ | 5 #ifndef COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ |
| 6 #define COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ | 6 #define COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 const GURL& wallpaper_url, | 347 const GURL& wallpaper_url, |
| 348 const base::FilePath& downloaded_file, | 348 const base::FilePath& downloaded_file, |
| 349 const base::FilePath& resized_directory); | 349 const base::FilePath& resized_directory); |
| 350 | 350 |
| 351 // Returns queue size. | 351 // Returns queue size. |
| 352 virtual size_t GetPendingListSizeForTesting() const = 0; | 352 virtual size_t GetPendingListSizeForTesting() const = 0; |
| 353 | 353 |
| 354 // Ruturns files identifier for the |account_id|. | 354 // Ruturns files identifier for the |account_id|. |
| 355 virtual WallpaperFilesId GetFilesId(const AccountId& account_id) const = 0; | 355 virtual WallpaperFilesId GetFilesId(const AccountId& account_id) const = 0; |
| 356 | 356 |
| 357 // If the device is enterprise managed and we're at the login screen, set the | 357 // If the device is enterprise managed and the device wallpaper policy exists, |
| 358 // device wallpaper as the login screen wallpaper. If the device is enterprise | 358 // set the device wallpaper as the login screen wallpaper. |
| 359 // managed and we're in a user session, only set the device wallpaper if there | |
| 360 // is no user policy wallpaper and the user hasn't changed the default or the | |
| 361 // device wallpaper. Returns true if the device wallpaper should be set as the | |
| 362 // wallpaper, otherwise returns false. | |
| 363 virtual bool SetDeviceWallpaperIfApplicable(const AccountId& account_id) = 0; | 359 virtual bool SetDeviceWallpaperIfApplicable(const AccountId& account_id) = 0; |
| 364 | 360 |
| 365 protected: | 361 protected: |
| 366 friend class TestApi; | 362 friend class TestApi; |
| 367 friend class WallpaperManagerBrowserTest; | 363 friend class WallpaperManagerBrowserTest; |
| 368 friend class WallpaperManagerBrowserTestDefaultWallpaper; | 364 friend class WallpaperManagerBrowserTestDefaultWallpaper; |
| 369 friend class WallpaperManagerPolicyTest; | 365 friend class WallpaperManagerPolicyTest; |
| 370 | 366 |
| 371 // The |CustomWallpaperElement| contains |first| the path of the image which | 367 // The |CustomWallpaperElement| contains |first| the path of the image which |
| 372 // is currently being loaded and or in progress of being loaded and |second| | 368 // is currently being loaded and or in progress of being loaded and |second| |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 | 627 |
| 632 base::WeakPtrFactory<WallpaperManagerBase> weak_factory_; | 628 base::WeakPtrFactory<WallpaperManagerBase> weak_factory_; |
| 633 | 629 |
| 634 private: | 630 private: |
| 635 DISALLOW_COPY_AND_ASSIGN(WallpaperManagerBase); | 631 DISALLOW_COPY_AND_ASSIGN(WallpaperManagerBase); |
| 636 }; | 632 }; |
| 637 | 633 |
| 638 } // namespace wallpaper | 634 } // namespace wallpaper |
| 639 | 635 |
| 640 #endif // COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ | 636 #endif // COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ |
| OLD | NEW |