Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: ash/public/interfaces/shelf.mojom

Issue 2259153002: mash: Port ash_sysui ShelfDelegateMus impl to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/public/interfaces/BUILD.gn ('k') | ash/public/interfaces/shelf.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module mash.shelf.mojom; 5 module ash.mojom;
6 6
7 import "mash/shelf/public/interfaces/shelf_constants.mojom";
8 import "skia/public/interfaces/bitmap.mojom"; 7 import "skia/public/interfaces/bitmap.mojom";
9 8
10 // TODO(msw): Add support for multiple displays (with unified and multi-shelf). 9 // These values match ash::ShelfAlignment.
10 enum ShelfAlignment { BOTTOM, LEFT, RIGHT, BOTTOM_LOCKED, };
11 11
12 // The Shelf controller allows clients (eg. Chrome) to control the mash shelf. 12 // These values match ash::ShelfAutoHideBehavior.
13 enum ShelfAutoHideBehavior { ALWAYS, NEVER, HIDDEN, };
14
15 // The Shelf controller allows clients (eg. Chrome) to control the ash shelf.
13 interface ShelfController { 16 interface ShelfController {
17 // Observers are immediately notified of the current shelf states when added.
14 AddObserver(associated ShelfObserver observer); 18 AddObserver(associated ShelfObserver observer);
15 19
16 SetAlignment(Alignment alignment); 20 // Set the shelf alignment and auto-hide behavior. See WmShelf for details.
17 SetAutoHideBehavior(AutoHideBehavior auto_hide); 21 SetAlignment(ShelfAlignment alignment, int64 display_id);
22 SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide, int64 display_id);
18 23
24 // Pin and unpin items on the shelf, or update shelf item images.
19 PinItem(ShelfItem item, associated ShelfItemDelegate delegate); 25 PinItem(ShelfItem item, associated ShelfItemDelegate delegate);
20 UnpinItem(string app_id); 26 UnpinItem(string app_id);
21
22 SetItemImage(string app_id, skia.mojom.Bitmap image); 27 SetItemImage(string app_id, skia.mojom.Bitmap image);
23 }; 28 };
24 29
25 // ShelfObserver is notified on shelf changes; used to persist profile settings. 30 // ShelfObserver is notified on shelf changes; used to persist profile settings.
26 interface ShelfObserver { 31 interface ShelfObserver {
27 OnAlignmentChanged(Alignment alignment); 32 OnShelfCreated(int64 display_id);
28 OnAutoHideBehaviorChanged(AutoHideBehavior auto_hide); 33 OnAlignmentChanged(ShelfAlignment alignment, int64 display_id);
34 OnAutoHideBehaviorChanged(ShelfAutoHideBehavior auto_hide, int64 display_id);
29 }; 35 };
30 36
31 // ShelfItemDelegate handles command execution and observes shelf item changes. 37 // ShelfItemDelegate handles command execution and observes shelf item changes.
32 interface ShelfItemDelegate { 38 interface ShelfItemDelegate {
33 // Called when a pinned shelf item is invoked without an open window. 39 // Called when a pinned shelf item is invoked without an open window.
34 LaunchItem(); 40 LaunchItem();
35 41
36 // Called on invocation of a shelf item's context menu command. 42 // Called on invocation of a shelf item's context menu command.
37 ExecuteCommand(uint32 command_id, int32 event_flags); 43 ExecuteCommand(uint32 command_id, int32 event_flags);
38 44
(...skipping 26 matching lines...) Expand all
65 71
66 // A app title, used for tooltips, etc. (eg. 'Foo Application'). 72 // A app title, used for tooltips, etc. (eg. 'Foo Application').
67 string app_title; 73 string app_title;
68 74
69 // An icon image Bitmap, shown on the shelf. 75 // An icon image Bitmap, shown on the shelf.
70 skia.mojom.Bitmap image; 76 skia.mojom.Bitmap image;
71 77
72 // Additional context menu items (eg. 'New Incognito Window'). 78 // Additional context menu items (eg. 'New Incognito Window').
73 array<ContextMenuItem>? context_menu_items; 79 array<ContextMenuItem>? context_menu_items;
74 }; 80 };
OLDNEW
« no previous file with comments | « ash/public/interfaces/BUILD.gn ('k') | ash/public/interfaces/shelf.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698