blob: f43be191ddbfef4c85ad80e29b32537614ad2d17 [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 "ash/public/interfaces/menu.mojom";
import "ui/events/mojo/event_constants.mojom";
// The previewed snap state for a window, corresponding to the use of a
// PhantomWindowController.
enum SnapDirection {
kNone, // No snap preview.
kLeft, // The phantom window controller is previewing a snap to the left.
kRight, // The phantom window controller is previewing a snap to the left.
enum OrientationLockType {
// Interface exposed via WindowTree::BindWindowManagerInterface(). This
// interface is used for functionality specific to Ash that is associated with
// windows created by the window service.
interface AshWindowManager {
AddWindowToTabletMode(uint64 window_id);
ShowSnapPreview(uint64 window_id, SnapDirection snap);
CommitSnap(uint64 window_id, SnapDirection snap);
// Locks or unlocks the screen orientation. The provided window is the source
// of the orientation request and need not be a top level window, but the
// client connection type must not be an embedding (i.e. renderer).
LockOrientation(uint64 window_id, OrientationLockType type);
UnlockOrientation(uint64 window_id);
// Maximizes the window in response to a double click or tap on the HTCAPTION
// area.
MaximizeWindowByCaptionClick(uint64 window_id, ui.mojom.PointerKind pointer);
// Plays the window bounce animation (scale the window up and down).
BounceWindow(uint64 window_id);
// Sets the context menu items to be displayed on a window's frame, for
// windows where the frame is provided by Ash. |delegate| handles interaction
// with the menu.
SetWindowFrameMenuItems(uint64 window_id, array<MenuItem> menu_items,
MenuDelegate delegate);