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

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

Issue 2441563002: arc: Create intermediate directories in c/b/c/arc (Closed)
Patch Set: Re-rebase to ToT Created 4 years, 1 month 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_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_SERVICE_H_
7
8 #include <stdint.h>
9
10 #include "ash/common/wallpaper/wallpaper_controller_observer.h"
11 #include "base/macros.h"
12 #include "chrome/browser/image_decoder.h"
13 #include "components/arc/arc_service.h"
14 #include "components/arc/common/wallpaper.mojom.h"
15 #include "components/arc/instance_holder.h"
16 #include "mojo/public/cpp/bindings/binding.h"
17
18 class SkBitmap;
19
20 namespace arc {
21
22 // Lives on the UI thread.
23 class ArcWallpaperService
24 : public ArcService,
25 public ash::WallpaperControllerObserver,
26 public ImageDecoder::ImageRequest,
27 public InstanceHolder<mojom::WallpaperInstance>::Observer,
28 public mojom::WallpaperHost {
29 public:
30 explicit ArcWallpaperService(ArcBridgeService* bridge_service);
31 ~ArcWallpaperService() override;
32
33 // InstanceHolder<mojom::WallpaperInstance>::Observer overrides.
34 void OnInstanceReady() override;
35 void OnInstanceClosed() override;
36
37 // mojom::WallpaperHost overrides.
38 // TODO(muyuanli): change callback prototype when use_new_wrapper_types is
39 // updated and merge them with the functions below.
40 void SetWallpaper(mojo::Array<uint8_t> png_data) override;
41 void GetWallpaper(const GetWallpaperCallback& callback) override;
42
43 // ImageDecoder::ImageRequest implementation.
44 void OnImageDecoded(const SkBitmap& bitmap) override;
45 void OnDecodeImageFailed() override;
46
47 // WallpaperControllerObserver implementation.
48 void OnWallpaperDataChanged() override;
49
50 private:
51 mojo::Binding<mojom::WallpaperHost> binding_;
52 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperService);
53 };
54
55 } // namespace arc
56
57 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_tts_service.cc ('k') | chrome/browser/chromeos/arc/arc_wallpaper_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698