| 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..abb881927c8fe12bff4ea20a0945d446c006d77d
|
| --- /dev/null
|
| +++ b/components/arc/wallpaper/arc_wallpaper_bridge.h
|
| @@ -0,0 +1,51 @@
|
| +// 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,
|
| + SetWallpaperDelegate* delegate);
|
| + ~ArcWallpaperBridge() override;
|
| +
|
| + // InstanceHolder<mojom::WallpaperInstance>::Observer overrides.
|
| + void OnInstanceReady() override;
|
| +
|
| + // mojom::WallpaperHost overrides.
|
| + // TODO(muyuanli): change callback prototype when use_new_wrapper_types is
|
| + // updated.
|
| + void SetWallpaper(mojo::Array<uint8_t> jpeg_data) override;
|
| + void GetWallpaper(
|
| + const base::Callback<void(mojo::Array<uint8_t>)>& callback) override;
|
| +
|
| + private:
|
| + SetWallpaperDelegate* const 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_
|
|
|