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

Side by Side Diff: components/arc/wallpaper/arc_wallpaper_bridge.h

Issue 2264743002: cheets: implement cros side of WallpaperManagerService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cheets: implement cros side of WallpaperManagerService. Created 4 years, 3 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 COMPONENTS_ARC_WALLPAPER_ARC_WALLPAPER_BRIDGE_H_
6 #define COMPONENTS_ARC_WALLPAPER_ARC_WALLPAPER_BRIDGE_H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "base/threading/thread_checker.h"
12 #include "components/arc/arc_service.h"
13 #include "components/arc/common/wallpaper.mojom.h"
14 #include "components/arc/instance_holder.h"
15 #include "mojo/public/cpp/bindings/binding.h"
16
17 namespace arc {
18
19 class ArcBridgeService;
20 class SetWallpaperDelegate;
21
22 class ArcWallpaperBridge
23 : public ArcService,
24 public InstanceHolder<mojom::WallpaperInstance>::Observer,
25 public mojom::WallpaperHost {
26 public:
27 ArcWallpaperBridge(ArcBridgeService* bridge_service,
28 SetWallpaperDelegate* delegate);
29 ~ArcWallpaperBridge() override;
30
31 // InstanceHolder<mojom::WallpaperInstance>::Observer overrides.
32 void OnInstanceReady() override;
33
34 // mojom::WallpaperHost overrides.
35 // TODO(muyuanli): change callback prototype when use_new_wrapper_types is
36 // updated.
37 void SetWallpaper(mojo::Array<uint8_t> jpeg_data) override;
38 void GetWallpaper(
39 const base::Callback<void(mojo::Array<uint8_t>)>& callback) override;
40
41 private:
42 SetWallpaperDelegate* const wallpaper_delegate_;
43 mojo::Binding<mojom::WallpaperHost> binding_;
44 base::ThreadChecker thread_checker_;
45
46 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperBridge);
47 };
48
49 } // namespace arc
50
51 #endif // COMPONENTS_ARC_WALLPAPER_ARC_WALLPAPER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698