// Copyright 2024 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 "url/mojom/url.mojom";
// The data retrieved from session restore for a single Lacros window that we
// need to display browser information to users.
[Stable]
struct SessionWindow {
// The ID of the window that uniquely identifies it for the duration of a
// session. The ID is also saved in the full restore file in ash, and we want
// to match the IDs to determine what to show in the UI.
int64 window_id@0;
// The app name of an app browser. This field will be empty for regular chrome
// browsers.
string app_name@1;
// The title of the active tab of it exists. Used to show a more descriptive
// title than "Chrome".
string active_tab_title@2;
// The URLs in the tab strip we want to display favicons for. The order is
// {active tab url, first tab url, second tab url, etc.}.
array<url.mojom.Url> urls@3;
// Number of tabs in this window.
uint32 tab_count@4;
// A stable identifier of the profile. It is computed by hashing the path of
// the profile's storage directory.
[MinVersion=1] uint64 profile_id@5;
};
// Interface for full restore clients. Implemented by lacros-chrome.
// Next version: 1
// Next method id: 1
[Stable]
interface FullRestoreClient {
// Gets the session restore information for the current active user. Note that
// current active user is temporary and the support for multi profile is
// coming soon. See http://b/329713493.
GetSessionInformation@0() => (array<SessionWindow> session_windows);
};
// Implemented by ash-chrome.
// Next version: 1
// Next method id: 1
[Stable, Uuid="eadbb2f2-ef64-4403-90ad-45d037f6c73b"]
interface FullRestore {
// Registers the client that lives in lacros-chrome.
AddFullRestoreClient@0(pending_remote<FullRestoreClient> client);
};