blob: bd77a6053f87a390e5614e6981b75dfcd920d8cc [file] [log] [blame]
// Copyright 2022 The Chromium Authors. All rights reserved.
// 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/string16.mojom";
// Interface to observe system timezone updates.
[Stable, Uuid="6c74acf2-44fe-40ef-aad0-c8bd0073ec3d"]
interface TimeZoneObserver {
// Called when the system timezone is updated.
// Also called just after initial registration.
// zone_id is ID the ID for a timezone, such as "America/Los_Angeles",
// or a custom ID such as "GMT-8:00".
OnTimeZoneChanged@0(mojo_base.mojom.String16 zone_id);
// Interface to register TimeZoneObserver.
[Stable, Uuid="98927de7-6858-4931-be9d-0475ef2421f2"]
interface TimeZoneService {
// Adds an observer for the system timezone updates.
// On the registration, OnTimeZoneChanged is called once
// to tell the current up-to-date timezone.
// On registration, this will trigger OnTimeZoneChanged immediately
// to notify the latest timezone settings to the observer.
AddObserver@0(pending_remote<TimeZoneObserver> observer);