| 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_WALLPAPER_ARC_WALLPAPER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_WALLPAPER_ARC_WALLPAPER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_WALLPAPER_ARC_WALLPAPER_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_WALLPAPER_ARC_WALLPAPER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> |
| 9 | 10 |
| 10 #include "ash/common/wallpaper/wallpaper_controller_observer.h" | 11 #include "ash/common/wallpaper/wallpaper_controller_observer.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "chrome/browser/image_decoder.h" | 13 #include "chrome/browser/image_decoder.h" |
| 13 #include "components/arc/arc_service.h" | 14 #include "components/arc/arc_service.h" |
| 14 #include "components/arc/common/wallpaper.mojom.h" | 15 #include "components/arc/common/wallpaper.mojom.h" |
| 15 #include "components/arc/instance_holder.h" | 16 #include "components/arc/instance_holder.h" |
| 16 #include "mojo/public/cpp/bindings/binding.h" | 17 #include "mojo/public/cpp/bindings/binding.h" |
| 17 | 18 |
| 18 class SkBitmap; | 19 class SkBitmap; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 30 explicit ArcWallpaperService(ArcBridgeService* bridge_service); | 31 explicit ArcWallpaperService(ArcBridgeService* bridge_service); |
| 31 ~ArcWallpaperService() override; | 32 ~ArcWallpaperService() override; |
| 32 | 33 |
| 33 // InstanceHolder<mojom::WallpaperInstance>::Observer overrides. | 34 // InstanceHolder<mojom::WallpaperInstance>::Observer overrides. |
| 34 void OnInstanceReady() override; | 35 void OnInstanceReady() override; |
| 35 void OnInstanceClosed() override; | 36 void OnInstanceClosed() override; |
| 36 | 37 |
| 37 // mojom::WallpaperHost overrides. | 38 // mojom::WallpaperHost overrides. |
| 38 // TODO(muyuanli): change callback prototype when use_new_wrapper_types is | 39 // TODO(muyuanli): change callback prototype when use_new_wrapper_types is |
| 39 // updated and merge them with the functions below. | 40 // updated and merge them with the functions below. |
| 40 void SetWallpaper(mojo::Array<uint8_t> png_data) override; | 41 void SetWallpaper(const std::vector<uint8_t>& png_data) override; |
| 41 void GetWallpaper(const GetWallpaperCallback& callback) override; | 42 void GetWallpaper(const GetWallpaperCallback& callback) override; |
| 42 | 43 |
| 43 // ImageDecoder::ImageRequest implementation. | 44 // ImageDecoder::ImageRequest implementation. |
| 44 void OnImageDecoded(const SkBitmap& bitmap) override; | 45 void OnImageDecoded(const SkBitmap& bitmap) override; |
| 45 void OnDecodeImageFailed() override; | 46 void OnDecodeImageFailed() override; |
| 46 | 47 |
| 47 // WallpaperControllerObserver implementation. | 48 // WallpaperControllerObserver implementation. |
| 48 void OnWallpaperDataChanged() override; | 49 void OnWallpaperDataChanged() override; |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 mojo::Binding<mojom::WallpaperHost> binding_; | 52 mojo::Binding<mojom::WallpaperHost> binding_; |
| 52 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperService); | 53 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperService); |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // namespace arc | 56 } // namespace arc |
| 56 | 57 |
| 57 #endif // CHROME_BROWSER_CHROMEOS_ARC_WALLPAPER_ARC_WALLPAPER_SERVICE_H_ | 58 #endif // CHROME_BROWSER_CHROMEOS_ARC_WALLPAPER_ARC_WALLPAPER_SERVICE_H_ |
| OLD | NEW |