// 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 "ui/gfx/geometry/mojo/geometry.mojom"; // Allows clients to control pieces of the UI used in first-run tutorials. // Exists because the first-run tutorial is a component extension run by // Chrome. Methods exist here instead of on the Shelf or SystemTray interfaces // due to small behavior differences (all methods only affect the primary // display, opening the system tray bubble is persistent, etc.). interface FirstRunHelper { // Cleans up the ash UI on tutorial start. Start(FirstRunHelperClient client); // Restores the ash UI on tutorial stop. Stop(); // Returns the bounds of the app list button on the primary display in screen // coordinates. GetAppListButtonBounds() => (gfx.mojom.Rect screen_bounds); // Opens the system tray bubble menu to show the default view. Does nothing if // the bubble is already open. The bubble stays open until explicitly closed. // Returns bubble bounds in screen coordinates. OpenTrayBubble() => (gfx.mojom.Rect screen_bounds); // Closes the system tray bubble menu. Does nothing if the bubble is already // closed. CloseTrayBubble(); // Returns the bounds of the help button on the system tray bubble menu in // screen coordinates. Returns empty bounds if the bubble is not open. GetHelpButtonBounds() => (gfx.mojom.Rect screen_bounds); }; // The client for the FirstRunHelper interface, e.g. chrome. interface FirstRunHelperClient { // Informs the client that something happened inside ash that should cancel // the tutorial (e.g. the device is shutting down). OnCancelled(); };