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

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: Style fix. 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 <set>
11 #include <vector>
12
13 #include "base/macros.h"
14 #include "base/threading/thread_checker.h"
15 #include "chrome/browser/image_decoder.h"
16 #include "components/arc/set_wallpaper_delegate.h"
17
18 class SkBitmap;
19
20 namespace arc {
21
22 class ArcWallpaperHandler : public SetWallpaperDelegate {
23 public:
24 ArcWallpaperHandler();
25 ~ArcWallpaperHandler() override;
26
27 // SetWallpaperDelegate implementation.
28 void SetWallpaper(const std::vector<uint8_t>& jpeg_data) override;
29
30 private:
31 class ImageRequestImpl;
32
33 // Called from ImageRequestImpl on decode completion.
34 void OnImageDecoded(ImageRequestImpl* request, const SkBitmap& bitmap);
35 void OnDecodeImageFailed(ImageRequestImpl* request);
36
37 base::ThreadChecker thread_checker_;
38
39 // The set of in-flight decode requests. Pointers are owned.
40 std::set<ImageRequestImpl*> inflight_requests_;
41
42 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperHandler);
43 };
44
45 } // namespace arc
46
47 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698