| 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_EXTENSIONS_WALLPAPER_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_PRIVATE_API_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_PRIVATE_API_H_ |
| 7 | 7 |
| 8 #include "ash/desktop_background/desktop_background_resources.h" | 8 #include "ash/desktop_background/desktop_background_resources.h" |
| 9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
| 10 #include "net/url_request/url_fetcher_delegate.h" | 10 #include "net/url_request/url_fetcher_delegate.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // AsyncExtensionFunction overrides. | 56 // AsyncExtensionFunction overrides. |
| 57 virtual bool RunImpl() OVERRIDE; | 57 virtual bool RunImpl() OVERRIDE; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 virtual void OnWallpaperDecoded(const gfx::ImageSkia& wallpaper) OVERRIDE; | 60 virtual void OnWallpaperDecoded(const gfx::ImageSkia& wallpaper) OVERRIDE; |
| 61 | 61 |
| 62 // Saves the image data to a file. | 62 // Saves the image data to a file. |
| 63 void SaveToFile(); | 63 void SaveToFile(); |
| 64 | 64 |
| 65 // Sets wallpaper to the decoded image. | 65 // Sets wallpaper to the decoded image. |
| 66 void SetDecodedWallpaper(); | 66 void SetDecodedWallpaper(scoped_ptr<gfx::ImageSkia> wallpaper); |
| 67 | 67 |
| 68 // Layout of the downloaded wallpaper. | 68 // Layout of the downloaded wallpaper. |
| 69 ash::WallpaperLayout layout_; | 69 ash::WallpaperLayout layout_; |
| 70 | 70 |
| 71 // The decoded wallpaper. | 71 // The decoded wallpaper. It may accessed from UI thread to set wallpaper or |
| 72 // FILE thread to resize and save wallpaper to disk. |
| 72 gfx::ImageSkia wallpaper_; | 73 gfx::ImageSkia wallpaper_; |
| 73 | 74 |
| 74 // Email address of logged in user. | 75 // Email address of logged in user. |
| 75 std::string email_; | 76 std::string email_; |
| 76 | 77 |
| 77 // High resolution wallpaper URL. | 78 // High resolution wallpaper URL. |
| 78 std::string url_; | 79 std::string url_; |
| 79 | 80 |
| 80 // String representation of downloaded wallpaper. | 81 // String representation of downloaded wallpaper. |
| 81 std::string image_data_; | 82 std::string image_data_; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 WallpaperRestoreMinimizedWindowsFunction(); | 127 WallpaperRestoreMinimizedWindowsFunction(); |
| 127 | 128 |
| 128 protected: | 129 protected: |
| 129 virtual ~WallpaperRestoreMinimizedWindowsFunction(); | 130 virtual ~WallpaperRestoreMinimizedWindowsFunction(); |
| 130 | 131 |
| 131 // AsyncExtensionFunction overrides. | 132 // AsyncExtensionFunction overrides. |
| 132 virtual bool RunImpl() OVERRIDE; | 133 virtual bool RunImpl() OVERRIDE; |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_PRIVATE_API_H_ | 136 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_PRIVATE_API_H_ |
| OLD | NEW |