blob: 390a386ef9e17999adb6324507fcce625ba8ae94 [file] [log] [blame]
// Copyright 2018 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 ash.mojom;
import "components/account_id/interfaces/account_id.mojom";
// Used to assign windows to user accounts so that ash shows the appropriate set
// of windows based on the active user.
interface MultiUserWindowManager {
SetClient(associated MultiUserWindowManagerClient client);
// Associates a window with an account. If |show_for_current_user| is true,
// the window is associated with |account_id|, but is shown for the currently
// active user.
SetWindowOwner(uint64 window_id,
signin.mojom.AccountId account_id,
bool show_for_current_user);
// Shows a previously registered window for the specified account.
ShowWindowForUser(uint64 window_id,
signin.mojom.AccountId account_id);
interface MultiUserWindowManagerClient {
// Called when the owner of a window supplied to SetWindowOwner() changes.
// |was_minimized| is true if the window was minimized. |teleported| is true
// if the window was not on the desktop of the current user.
OnWindowOwnerEntryChanged(uint64 window_id,
signin.mojom.AccountId account_id,
bool was_minimized,
bool teleported);
// Called when the active account changes. This is followed by
// OnTransitionUserShelfToNewAccount() and OnDidSwitchActiveAccount().
OnWillSwitchActiveAccount(signin.mojom.AccountId account_id);
// Called at the time when the user's shelf should transition to the account
// supplied to OnWillSwitchActiveAccount().
// Called when the active account change is complete.