native_theme.mojom 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2021 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. // Information about Ash's native theme to be propagated to lacros.
  6. [Stable]
  7. struct NativeThemeInfo {
  8. // If true, then dark mode is enabled
  9. // If false, then dark mode is disabled.
  10. bool dark_mode;
  11. };
  12. // Interface for native theme info observers. Implemented by lacros-chrome.
  13. // Used by ash-chrome to send native theme info updates.
  14. [Stable, Uuid="87938675-6596-4ddd-a0d1-3110c27651e9"]
  15. interface NativeThemeInfoObserver {
  16. // Called when an observed native theme info changes, subject to throttling
  17. // to avoid flodding.
  18. OnNativeThemeInfoChanged@0(NativeThemeInfo native_theme_info);
  19. };
  20. // Interface that allows clients to receive info and configs related to the
  21. // system (ash) native theme changes. Implemented by ash-chrome.
  22. [Stable, Uuid="0500f813-27d6-4102-a5d1-0115827c1aae"]
  23. interface NativeThemeService {
  24. // Adds an observer for changes in native theme info. The observer is fired
  25. // immediately with the current value. Multiple observers may be registered.
  26. AddNativeThemeInfoObserver@0(
  27. pending_remote<NativeThemeInfoObserver> observer);
  28. };