OLD | NEW |
---|---|
(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 void SetWallpaper(mojo::Array<uint8_t> jpeg_data) override; | |
36 void GetWallpaper( | |
37 const base::Callback<void(mojo::Array<uint8_t>)>& callback) override; | |
38 | |
39 private: | |
40 SetWallpaperDelegate* wallpaper_delegate_; | |
xiyuan
2016/08/23 20:43:48
nit: SetWallpaperDelegate* const
Muyuan
2016/08/23 21:20:38
Done.
| |
41 mojo::Binding<mojom::WallpaperHost> binding_; | |
42 base::ThreadChecker thread_checker_; | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperBridge); | |
45 }; | |
46 | |
47 } // namespace arc | |
48 | |
49 #endif // COMPONENTS_ARC_WALLPAPER_ARC_WALLPAPER_BRIDGE_H_ | |
OLD | NEW |