chromium/chromeos/crosapi/mojom/extension_info_private.mojom

// 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 crosapi.mojom;

import "mojo/public/mojom/base/values.mojom";

// ExtensionInfoPrivate is a service that allows trusted extensions in Lacros to
// get and set system properties. Implemented in Ash.
[Stable, Uuid="97236d3f-848a-4365-8c7e-f4133e0c79ff"]
interface ExtensionInfoPrivate {
  // Returns a Dictionary-type base::Value that contains all results. This is
  // considered an opaque value that is directly passed to the extension.
  GetSystemProperties@0(array<string> property_names) =>
      (mojo_base.mojom.Value properties);

  // Sets the system timezone. There is no validation that the value is valid.
  // This matches pre-existing behavior.
  SetTimezone@1(string value);

  // Sets a system property. Validation happens in ash. If the property is not
  // found, returns |false| and has no effect.
  SetBool@2(string property_name, bool value) => (bool found);

  // Returns whether tablet mode is enabled.
  IsTabletModeEnabled@3() => (bool enabled);
};