| 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_API_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ |
| 7 | 7 |
| 8 #include "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" |
| 9 #include "chrome/browser/chromeos/extensions/wallpaper_function_base.h" | 9 #include "chrome/browser/chromeos/extensions/wallpaper_function_base.h" |
| 10 #include "chrome/common/extensions/api/wallpaper.h" | 10 #include "chrome/common/extensions/api/wallpaper.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public: | 22 public: |
| 23 DECLARE_EXTENSION_FUNCTION("wallpaper.setWallpaper", | 23 DECLARE_EXTENSION_FUNCTION("wallpaper.setWallpaper", |
| 24 WALLPAPER_SETWALLPAPER) | 24 WALLPAPER_SETWALLPAPER) |
| 25 | 25 |
| 26 WallpaperSetWallpaperFunction(); | 26 WallpaperSetWallpaperFunction(); |
| 27 | 27 |
| 28 protected: | 28 protected: |
| 29 virtual ~WallpaperSetWallpaperFunction(); | 29 virtual ~WallpaperSetWallpaperFunction(); |
| 30 | 30 |
| 31 // AsyncExtensionFunction overrides. | 31 // AsyncExtensionFunction overrides. |
| 32 virtual bool RunAsync() OVERRIDE; | 32 virtual bool RunAsync() override; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 virtual void OnWallpaperDecoded(const gfx::ImageSkia& image) OVERRIDE; | 35 virtual void OnWallpaperDecoded(const gfx::ImageSkia& image) override; |
| 36 | 36 |
| 37 // Generates thumbnail of custom wallpaper. A simple STRETCH is used for | 37 // Generates thumbnail of custom wallpaper. A simple STRETCH is used for |
| 38 // generating thumbnail. | 38 // generating thumbnail. |
| 39 void GenerateThumbnail(const base::FilePath& thumbnail_path, | 39 void GenerateThumbnail(const base::FilePath& thumbnail_path, |
| 40 scoped_ptr<gfx::ImageSkia> image); | 40 scoped_ptr<gfx::ImageSkia> image); |
| 41 | 41 |
| 42 // Thumbnail is ready. Calls api function javascript callback. | 42 // Thumbnail is ready. Calls api function javascript callback. |
| 43 void ThumbnailGenerated(base::RefCountedBytes* data); | 43 void ThumbnailGenerated(base::RefCountedBytes* data); |
| 44 | 44 |
| 45 // Called by OnURLFetchComplete(). | 45 // Called by OnURLFetchComplete(). |
| (...skipping 10 matching lines...) Expand all Loading... |
| 56 // User id hash of the logged in user. | 56 // User id hash of the logged in user. |
| 57 std::string user_id_hash_; | 57 std::string user_id_hash_; |
| 58 | 58 |
| 59 // Sequence token associated with wallpaper operations. Shared with | 59 // Sequence token associated with wallpaper operations. Shared with |
| 60 // WallpaperManager. | 60 // WallpaperManager. |
| 61 base::SequencedWorkerPool::SequenceToken sequence_token_; | 61 base::SequencedWorkerPool::SequenceToken sequence_token_; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ | 64 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ |
| 65 | 65 |
| OLD | NEW |