// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module ash.color_internals.mojom;
import "skia/public/mojom/skcolor.mojom";
// The colors calculated from the current user wallpaper.
struct WallpaperCalculatedColors {
skia.mojom.SkColor k_mean_color;
skia.mojom.SkColor celebi_color;
};
// Observer that notifies color internals WebUI when wallpaper calculated colors
// change.
interface WallpaperColorsObserver {
// Notifies mojom observer of changes to wallpaper colors. Triggered by
// `WallpaperControllerObserver::OnWallpaperColorsChanged`.
OnWallpaperColorsChanged(WallpaperCalculatedColors colors);
};
// Used by color internals WebUI to query browser process about wallpaper
// colors.
interface WallpaperColorsHandler {
// Begin listening for updates to wallpaper colors.
SetWallpaperColorsObserver(
pending_remote<WallpaperColorsObserver> observer);
};