Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: chrome/browser/chromeos/arc/arc_wallpaper_handler.h

Issue 2061183002: arc: IPC method to set custom wallpaper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small amend. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_
7
8 #include <stdint.h>
9
10 #include <memory>
hidehiko 2016/06/16 20:31:53 Unnecessary?
Shuhei Takahashi 2016/06/17 02:12:49 Done.
11 #include <set>
12
hidehiko 2016/06/16 20:31:53 #include <vector> is still needed (SetWallpaper's
Shuhei Takahashi 2016/06/17 02:12:49 Done.
13 #include "base/macros.h"
14 #include "chrome/browser/image_decoder.h"
15 #include "components/arc/set_wallpaper_delegate.h"
16
17 class SkBitmap;
18
19 namespace arc {
20
21 class ArcWallpaperHandler : public SetWallpaperDelegate {
22 public:
23 ArcWallpaperHandler() = default;
24 virtual ~ArcWallpaperHandler();
25
26 // SetWallpaperDelegate implementation.
27 void SetWallpaper(const std::vector<uint8_t>& jpeg_data) override;
28
29 private:
30 class ImageRequestImpl;
31
32 // Called from ImageRequestImpl on decode completion.
33 void OnImageDecoded(ImageRequestImpl* request, const SkBitmap& bitmap);
34 void OnDecodeImageFailed(ImageRequestImpl* request);
35
36 // The set of in-flight decode requests. Pointers are owned.
37 std::set<ImageRequestImpl*> inflight_requests_;
38
39 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperHandler);
40 };
41
42 } // namespace arc
43
44 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698