| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ARC_ARC_WALLPAPER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // Lives on the UI thread. | 22 // Lives on the UI thread. |
| 23 class ArcWallpaperHandler : public SetWallpaperDelegate, | 23 class ArcWallpaperHandler : public SetWallpaperDelegate, |
| 24 public ImageDecoder::ImageRequest { | 24 public ImageDecoder::ImageRequest { |
| 25 public: | 25 public: |
| 26 ArcWallpaperHandler(); | 26 ArcWallpaperHandler(); |
| 27 ~ArcWallpaperHandler() override; | 27 ~ArcWallpaperHandler() override; |
| 28 | 28 |
| 29 // SetWallpaperDelegate implementation. | 29 // SetWallpaperDelegate implementation. |
| 30 void SetWallpaper(std::vector<uint8_t> jpeg_data) override; | 30 void SetWallpaper(std::vector<uint8_t> jpeg_data) override; |
| 31 | 31 // Returns current wallpaper. |
| 32 void GetWallpaper(const base::Callback<void(std::vector<uint8_t> image)>& |
| 33 callback) const override; |
| 32 // ImageDecoder::ImageRequest implementation. | 34 // ImageDecoder::ImageRequest implementation. |
| 33 void OnImageDecoded(const SkBitmap& bitmap) override; | 35 void OnImageDecoded(const SkBitmap& bitmap) override; |
| 34 void OnDecodeImageFailed() override; | 36 void OnDecodeImageFailed() override; |
| 35 | 37 |
| 36 private: | 38 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperHandler); | 39 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperHandler); |
| 38 }; | 40 }; |
| 39 | 41 |
| 40 } // namespace arc | 42 } // namespace arc |
| 41 | 43 |
| 42 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_ | 44 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_ |
| OLD | NEW |