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 "components/wallpaper/wallpaper_manager_base.h" | 5 #include "components/wallpaper/wallpaper_manager_base.h" |
6 | 6 |
7 #include <numeric> | 7 #include <numeric> |
8 #include <vector> | 8 #include <vector> |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/prefs/pref_registry_simple.h" | |
17 #include "base/prefs/pref_service.h" | |
18 #include "base/prefs/scoped_user_pref_update.h" | |
19 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
21 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
22 #include "base/sys_info.h" | 19 #include "base/sys_info.h" |
23 #include "base/threading/worker_pool.h" | 20 #include "base/threading/worker_pool.h" |
24 #include "base/time/time.h" | 21 #include "base/time/time.h" |
25 #include "base/values.h" | 22 #include "base/values.h" |
| 23 #include "components/prefs/pref_registry_simple.h" |
| 24 #include "components/prefs/pref_service.h" |
| 25 #include "components/prefs/scoped_user_pref_update.h" |
26 #include "components/signin/core/account_id/account_id.h" | 26 #include "components/signin/core/account_id/account_id.h" |
27 #include "components/user_manager/user.h" | 27 #include "components/user_manager/user.h" |
28 #include "components/user_manager/user_image/user_image.h" | 28 #include "components/user_manager/user_image/user_image.h" |
29 #include "components/user_manager/user_manager.h" | 29 #include "components/user_manager/user_manager.h" |
30 #include "components/user_manager/user_type.h" | 30 #include "components/user_manager/user_type.h" |
31 #include "components/wallpaper/wallpaper_layout.h" | 31 #include "components/wallpaper/wallpaper_layout.h" |
32 #include "third_party/skia/include/core/SkColor.h" | 32 #include "third_party/skia/include/core/SkColor.h" |
33 #include "ui/gfx/codec/jpeg_codec.h" | 33 #include "ui/gfx/codec/jpeg_codec.h" |
34 #include "ui/gfx/geometry/safe_integer_conversions.h" | 34 #include "ui/gfx/geometry/safe_integer_conversions.h" |
35 #include "ui/gfx/image/image_skia_operations.h" | 35 #include "ui/gfx/image/image_skia_operations.h" |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 void WallpaperManagerBase::CreateSolidDefaultWallpaper() { | 994 void WallpaperManagerBase::CreateSolidDefaultWallpaper() { |
995 loaded_wallpapers_for_test_++; | 995 loaded_wallpapers_for_test_++; |
996 SkBitmap bitmap; | 996 SkBitmap bitmap; |
997 bitmap.allocN32Pixels(1, 1); | 997 bitmap.allocN32Pixels(1, 1); |
998 bitmap.eraseColor(kDefaultWallpaperColor); | 998 bitmap.eraseColor(kDefaultWallpaperColor); |
999 const gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(bitmap); | 999 const gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(bitmap); |
1000 default_wallpaper_image_.reset(new user_manager::UserImage(image)); | 1000 default_wallpaper_image_.reset(new user_manager::UserImage(image)); |
1001 } | 1001 } |
1002 | 1002 |
1003 } // namespace wallpaper | 1003 } // namespace wallpaper |
OLD | NEW |