1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31

ash / webui / personalization_app / personalization_app_wallpaper_provider.h [blame]

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_WEBUI_PERSONALIZATION_APP_PERSONALIZATION_APP_WALLPAPER_PROVIDER_H_
#define ASH_WEBUI_PERSONALIZATION_APP_PERSONALIZATION_APP_WALLPAPER_PROVIDER_H_

#include "ash/webui/personalization_app/mojom/personalization_app.mojom.h"
#include "content/public/browser/web_ui_data_source.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"

namespace ash::personalization_app {

// Handles calling |backdrop_wallpaper_handler| code in //chrome to pass to the
// Personalization App SWA.
class PersonalizationAppWallpaperProvider : public mojom::WallpaperProvider {
 public:
  virtual void BindInterface(
      mojo::PendingReceiver<mojom::WallpaperProvider> receiver) = 0;

  virtual void GetWallpaperAsJpegBytes(
      content::WebUIDataSource::GotDataCallback callback) = 0;

  // Not all users that can view the personalization app can also see google
  // photos. Users without a gaia account cannot use the photos APIs.
  virtual bool IsEligibleForGooglePhotos() = 0;
};

}  // namespace ash::personalization_app

#endif  // ASH_WEBUI_PERSONALIZATION_APP_PERSONALIZATION_APP_WALLPAPER_PROVIDER_H_