| // Copyright 2019 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; |
| |
| // These values match ash::ShelfAutoHideBehavior. |
| enum ShelfAutoHideBehavior { |
| SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, // Always auto-hide. |
| SHELF_AUTO_HIDE_BEHAVIOR_NEVER, // Never auto-hide. |
| SHELF_AUTO_HIDE_ALWAYS_HIDDEN, // Always hide. |
| }; |
| |
| // These values match ash::ShelfAlignment. |
| enum ShelfAlignment { |
| SHELF_ALIGNMENT_BOTTOM, // Bottom alignment. |
| SHELF_ALIGNMENT_LEFT, // Left alignment. |
| SHELF_ALIGNMENT_RIGHT, // Right alignment. |
| SHELF_ALIGNMENT_BOTTOM_LOCKED, // Bottom alignment, set temporarily and not |
| // saved to preferences. |
| }; |
| |
| // Test interface used to interact with the Shelf from integration tests. |
| // Note this interface applies the shelf properties from the call |
| // arguments and might be lost if tests do something that triggers |
| // applying shelf properties from prefs, such as switching user, |
| // entering/exiting tablet mode, changing display config, etc. |
| interface ShelfIntegrationTestApi { |
| // Returns the auto hide behavior. |
| // |display_id| represents the display that contains the shelf. |display_id| |
| // must be valid. |
| GetAutoHideBehavior(int64 display_id) => (ShelfAutoHideBehavior behavior); |
| |
| // Sets the auto hide behavior. |
| // |display_id| represents the display that contains the shelf. |display_id| |
| // must be valid. |
| // |behavior| is the new behavior. |
| SetAutoHideBehavior(int64 display_id, ShelfAutoHideBehavior behavior) => (); |
| |
| // Sets the alignment. |
| // |display_id| represents the display that contains the shelf. |display_id| |
| // must be valid. |
| // |alignment| is the new alignment. |
| SetAlignment(int64 display_id, ShelfAlignment alignment) => (); |
| |
| // Returns the alignment. |
| // |display_id| represents the display that contains the shelf. |display_id| |
| // must be valid. |
| GetAlignment(int64 display_id) => (ShelfAlignment alignment); |
| }; |