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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/desktop_background/desktop_background_resources.h" | 10 #include "ash/desktop_background/desktop_background_resources.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 void OnWallpaperDecoded(const std::string& email, | 258 void OnWallpaperDecoded(const std::string& email, |
259 ash::WallpaperLayout layout, | 259 ash::WallpaperLayout layout, |
260 bool update_wallpaper, | 260 bool update_wallpaper, |
261 const UserImage& wallpaper); | 261 const UserImage& wallpaper); |
262 | 262 |
263 // Saves encoded wallpaper to |path|. This callback is called after encoding | 263 // Saves encoded wallpaper to |path|. This callback is called after encoding |
264 // to PNG completes. | 264 // to PNG completes. |
265 void OnWallpaperEncoded(const FilePath& path, | 265 void OnWallpaperEncoded(const FilePath& path, |
266 scoped_refptr<base::RefCountedBytes> data); | 266 scoped_refptr<base::RefCountedBytes> data); |
267 | 267 |
| 268 // Generates thumbnail of custom wallpaper on FILE thread. If |persistent| is |
| 269 // true, saves original custom image and resized images to disk. |
| 270 void ProcessCustomWallpaper(const std::string& email, |
| 271 bool persistent, |
| 272 const WallpaperInfo& info, |
| 273 base::WeakPtr<WallpaperDelegate> delegate, |
| 274 scoped_ptr<gfx::ImageSkia> image, |
| 275 const UserImage::RawImage& raw_image); |
| 276 |
268 // Record data for User Metrics Analysis. | 277 // Record data for User Metrics Analysis. |
269 void RecordUma(User::WallpaperType type, int index); | 278 void RecordUma(User::WallpaperType type, int index); |
270 | 279 |
271 // Saves original custom wallpaper to |path| (absolute path) on filesystem | 280 // Saves original custom wallpaper to |path| (absolute path) on filesystem |
272 // and starts resizing operation of the custom wallpaper if necessary. | 281 // and starts resizing operation of the custom wallpaper if necessary. |
273 void SaveCustomWallpaper(const std::string& email, | 282 void SaveCustomWallpaper(const std::string& email, |
274 const FilePath& path, | 283 const FilePath& path, |
275 ash::WallpaperLayout layout, | 284 ash::WallpaperLayout layout, |
276 const UserImage& wallpaper); | 285 const UserImage& wallpaper); |
277 | 286 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 content::NotificationRegistrar registrar_; | 347 content::NotificationRegistrar registrar_; |
339 | 348 |
340 base::OneShotTimer<WallpaperManager> timer_; | 349 base::OneShotTimer<WallpaperManager> timer_; |
341 | 350 |
342 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); | 351 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); |
343 }; | 352 }; |
344 | 353 |
345 } // namespace chromeos | 354 } // namespace chromeos |
346 | 355 |
347 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 356 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
OLD | NEW |