Index: components/arc/set_wallpaper_delegate.h |
diff --git a/components/arc/set_wallpaper_delegate.h b/components/arc/set_wallpaper_delegate.h |
index 28e5ed038c5248a219b2b3f78e1294c8d4a7cd5a..9494f5b89987ae988ad7b0050061aeebf6b73b57 100644 |
--- a/components/arc/set_wallpaper_delegate.h |
+++ b/components/arc/set_wallpaper_delegate.h |
@@ -12,12 +12,22 @@ |
namespace arc { |
// Delegate to allow setting the wallpaper. |
+// TODO(muyuanli): This class will be removed once ArcIntentHelper migrates to |
+// WallpaperManager API. |
class SetWallpaperDelegate { |
public: |
virtual ~SetWallpaperDelegate() = default; |
+ static SetWallpaperDelegate* instance() { return instance_; } |
+ static void set_instance(SetWallpaperDelegate* delegate) { |
+ instance_ = delegate; |
+ } |
+ |
// Sets an image represented in JPEG format as the wallpaper. |
- virtual void SetWallpaper(std::vector<uint8_t> jpeg_data) = 0; |
+ virtual void SetWallpaperJpeg(const std::vector<uint8_t>& jpeg_data) = 0; |
+ |
+ private: |
+ static SetWallpaperDelegate* instance_; |
}; |
} // namespace arc |