Chromium Code Reviews| 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 "components/arc/arc_bridge_service.h" | |
|
xiyuan
2016/08/19 23:04:07
We can move this into cc file and forward declare
Muyuan
2016/08/22 22:25:00
Done.
| |
| 12 #include "components/arc/arc_service.h" | |
| 13 #include "components/arc/common/wallpaper.mojom.h" | |
| 14 #include "components/arc/instance_holder.h" | |
| 15 #include "components/arc/set_wallpaper_delegate.h" | |
|
xiyuan
2016/08/19 23:04:07
Move to cc file and forward declare SetWallpaperDe
Muyuan
2016/08/22 22:25:00
Done.
| |
| 16 #include "mojo/public/cpp/bindings/binding.h" | |
| 17 | |
| 18 namespace arc { | |
| 19 | |
| 20 class ArcWallpaperBridge | |
| 21 : public ArcService, | |
| 22 public InstanceHolder<mojom::WallpaperInstance>::Observer, | |
| 23 public mojom::WallpaperHost { | |
| 24 public: | |
| 25 explicit ArcWallpaperBridge(ArcBridgeService* bridge_service, | |
|
xiyuan
2016/08/19 23:04:07
"explicit" is only needed for single arg ctor, so
Muyuan
2016/08/22 22:25:00
Done.
| |
| 26 const std::shared_ptr<SetWallpaperDelegate>& | |
| 27 delegate); | |
| 28 ~ArcWallpaperBridge() override; | |
| 29 | |
| 30 // InstanceHolder<mojom::WallpaperInstance>::Observer overrides. | |
| 31 void OnInstanceReady() override; | |
| 32 | |
| 33 // mojo::WallpaperHost overrides. | |
| 34 void SetWallpaper(mojo::Array<uint8_t> jpeg_data) override; | |
| 35 void GetWallpaper(const base::Callback<void(mojo::Array<uint8_t>)>& callback) | |
| 36 override; | |
| 37 | |
| 38 private: | |
| 39 std::shared_ptr<SetWallpaperDelegate> wallpaper_delegate_; | |
| 40 mojo::Binding<mojom::WallpaperHost> binding_; | |
| 41 base::ThreadChecker thread_checker_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperBridge); | |
| 44 }; | |
| 45 | |
| 46 } // namespace arc | |
| 47 | |
| 48 #endif // COMPONENTS_ARC_WALLPAPER_ARC_WALLPAPER_BRIDGE_H_ | |
| OLD | NEW |