Chromium Code Reviews| Index: components/arc/wallpaper/arc_wallpaper_bridge.h |
| diff --git a/components/arc/wallpaper/arc_wallpaper_bridge.h b/components/arc/wallpaper/arc_wallpaper_bridge.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..db26655ddb1655dea03fb13a81b5461effb3294f |
| --- /dev/null |
| +++ b/components/arc/wallpaper/arc_wallpaper_bridge.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_ARC_WALLPAPER_ARC_WALLPAPER_BRIDGE_H_ |
| +#define COMPONENTS_ARC_WALLPAPER_ARC_WALLPAPER_BRIDGE_H_ |
| + |
| +#include <stdint.h> |
| + |
| +#include "base/macros.h" |
| +#include "base/threading/thread_checker.h" |
| +#include "components/arc/arc_service.h" |
| +#include "components/arc/common/wallpaper.mojom.h" |
| +#include "components/arc/instance_holder.h" |
| +#include "mojo/public/cpp/bindings/binding.h" |
| + |
| +namespace arc { |
| + |
| +class ArcBridgeService; |
| +class SetWallpaperDelegate; |
| + |
| +class ArcWallpaperBridge |
| + : public ArcService, |
| + public InstanceHolder<mojom::WallpaperInstance>::Observer, |
| + public mojom::WallpaperHost { |
| + public: |
| + ArcWallpaperBridge(ArcBridgeService* bridge_service, |
| + const std::shared_ptr<SetWallpaperDelegate>& delegate); |
| + ~ArcWallpaperBridge() override; |
| + |
| + // InstanceHolder<mojom::WallpaperInstance>::Observer overrides. |
| + void OnInstanceReady() override; |
| + |
| + // mojo::WallpaperHost overrides. |
|
Shuhei Takahashi
2016/08/23 09:34:22
nit: mojo[m]::
Muyuan
2016/08/23 19:45:49
Done.
|
| + void SetWallpaper(mojo::Array<uint8_t> jpeg_data) override; |
| + void GetWallpaper( |
| + const base::Callback<void(mojo::Array<uint8_t>)>& callback) override; |
| + |
| + private: |
| + std::shared_ptr<SetWallpaperDelegate> wallpaper_delegate_; |
| + mojo::Binding<mojom::WallpaperHost> binding_; |
| + base::ThreadChecker thread_checker_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ArcWallpaperBridge); |
| +}; |
| + |
| +} // namespace arc |
| + |
| +#endif // COMPONENTS_ARC_WALLPAPER_ARC_WALLPAPER_BRIDGE_H_ |