// Copyright 2023 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 "ui/gfx/image/mojom/image.mojom";
[Stable, Extensible]
enum InstanceType {
[Default] kIsolatedWebAppInstaller,
};
[Stable]
struct WindowData {
// The key of the Shelf item. The caller is responsible for defining a unique
// ID for each Shelf item they want to add. If a Shelf item with the |item_id|
// already exists, the existing Shelf item will be updated.
string item_id@0;
// Unique wayland ID for the window.
string window_id@1;
// Type of the instance that owns the window, used to create the associated
// ShelfItemDelegate.
InstanceType instance_type@2;
// The Shelf item's icon.
gfx.mojom.ImageSkia? icon@3;
};
// Implemented in ash-chrome, called by lacros-chrome. This interface is used by
// Lacros to integrate its windows with Ash shelf.
[Stable, Uuid="ae203cbb-22b8-4c26-8a3d-2e01f73aa94d"]
interface LacrosShelfItemTracker{
// Adds or updates the window to the tracker. Tracker will decide whether to
// add a new item to the Shelf depending on the |item_id|.
AddOrUpdateWindow@0(WindowData window_data);
};