wallpaper.mojom 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2022 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. module crosapi.mojom;
  5. import "mojo/public/mojom/base/values.mojom";
  6. [Extensible, Stable]
  7. enum WallpaperLayout {
  8. kNone = 0,
  9. kStretch = 1,
  10. kCenter = 2,
  11. kCenterCropped = 3,
  12. };
  13. [Stable, Uuid="a2940756-55ef-4fc7-af10-f74a5bba6716"]
  14. struct WallpaperSettings {
  15. array<uint8> data@0; // The jpeg or png encoded wallpaper image.
  16. WallpaperLayout layout@1; // Layout of the wallpaper on the desktop.
  17. string filename@2; // The file name of the saved wallpaper.
  18. };
  19. // Interface for wallpaper. Implemented by ash-chrome.
  20. // |extension_id| and |extension_name| are from the extension that is setting
  21. // the wallpaper (ie, using the wallpaper API). This information is used
  22. // internally to notify the Wallpaper Manager about the change.
  23. // Next version: 1
  24. // Next method id: 1
  25. [Stable, Uuid="e2529a0d-9b3d-4ca3-9cca-23bc94a709e9"]
  26. interface Wallpaper {
  27. // Sets the wallpaper.
  28. SetWallpaper@0(WallpaperSettings wallpaper, string extension_id,
  29. string extension_name) => (array<uint8> thumbnail_data);
  30. };