| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FUNCTION_BASE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_FUNCTION_BASE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_FUNCTION_BASE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_FUNCTION_BASE_H_ |
| 7 | 7 |
| 8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
| 9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "extensions/browser/extension_function.h" |
| 10 #include "ui/gfx/image/image_skia.h" | 10 #include "ui/gfx/image/image_skia.h" |
| 11 | 11 |
| 12 namespace wallpaper_api_util { | 12 namespace wallpaper_api_util { |
| 13 ash::WallpaperLayout GetLayoutEnum(const std::string& layout); | 13 ash::WallpaperLayout GetLayoutEnum(const std::string& layout); |
| 14 } // namespace wallpaper_api_util | 14 } // namespace wallpaper_api_util |
| 15 | 15 |
| 16 // Wallpaper manager function base. It contains a image decoder to decode | 16 // Wallpaper manager function base. It contains a image decoder to decode |
| 17 // wallpaper data. | 17 // wallpaper data. |
| 18 class WallpaperFunctionBase : public AsyncExtensionFunction { | 18 class WallpaperFunctionBase : public AsyncExtensionFunction { |
| 19 public: | 19 public: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 35 void OnCancel(); | 35 void OnCancel(); |
| 36 | 36 |
| 37 // Handles failure case. Sets error message. | 37 // Handles failure case. Sets error message. |
| 38 void OnFailure(const std::string& error); | 38 void OnFailure(const std::string& error); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 virtual void OnWallpaperDecoded(const gfx::ImageSkia& wallpaper) = 0; | 41 virtual void OnWallpaperDecoded(const gfx::ImageSkia& wallpaper) = 0; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_FUNCTION_BASE_H_ | 44 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_FUNCTION_BASE_H_ |
| OLD | NEW |