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

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

Issue 1835403002: Support additional mash shelf alignments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase; address comments (sorry). Created 4 years, 8 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
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 mash.shelf.mojom;
6 6
7 import "mash/shelf/public/interfaces/shelf_constants.mojom";
7 import "skia/public/interfaces/bitmap.mojom"; 8 import "skia/public/interfaces/bitmap.mojom";
8 9
9 // TODO(msw): Add support for multiple displays (with unified and multi-shelf). 10 // TODO(msw): Add support for multiple displays (with unified and multi-shelf).
10 11
11 // The Shelf controller allows clients (eg. Chrome) to control the mash shelf. 12 // The Shelf controller allows clients (eg. Chrome) to control the mash shelf.
12 interface ShelfController { 13 interface ShelfController {
13 AddObserver(associated ShelfObserver observer); 14 AddObserver(associated ShelfObserver observer);
14 15
15 SetAlignment(Alignment alignment); 16 SetAlignment(Alignment alignment);
16 SetAutoHideBehavior(AutoHideBehavior auto_hide); 17 SetAutoHideBehavior(AutoHideBehavior auto_hide);
(...skipping 15 matching lines...) Expand all
32 33
33 // Called when a shelf item is pinned or unpinned. 34 // Called when a shelf item is pinned or unpinned.
34 ItemPinned(); 35 ItemPinned();
35 ItemUnpinned(); 36 ItemUnpinned();
36 37
37 // Called when a pinned shelf item is reordered. 38 // Called when a pinned shelf item is reordered.
38 // |order| is the index of the item on the shelf. 39 // |order| is the index of the item on the shelf.
39 ItemReordered(uint32 order); 40 ItemReordered(uint32 order);
40 }; 41 };
41 42
42 // These values match ash::ShelfAlignment.
43 enum Alignment { BOTTOM, LEFT, RIGHT, };
44
45 // These values match ash::ShelfAutoHideBehavior.
46 enum AutoHideBehavior { ALWAYS, NEVER, HIDDEN, };
47
48 // ContextMenuItems may be used to supplement ash shelf item context menus. 43 // ContextMenuItems may be used to supplement ash shelf item context menus.
49 struct ContextMenuItem { 44 struct ContextMenuItem {
50 enum Type { ITEM, CHECK, RADIO, SEPARATOR, SUBMENU }; 45 enum Type { ITEM, CHECK, RADIO, SEPARATOR, SUBMENU };
51 46
52 Type type; 47 Type type;
53 uint32 command_id; 48 uint32 command_id;
54 string? label; 49 string? label;
55 array<ContextMenuItem>? submenu; 50 array<ContextMenuItem>? submenu;
56 bool enabled; 51 bool enabled;
57 bool checked; 52 bool checked;
58 uint32 radio_group_id; 53 uint32 radio_group_id;
59 }; 54 };
60 55
61 // ShelfItem contains the basic fields needed to pin shortcut items. 56 // ShelfItem contains the basic fields needed to pin shortcut items.
62 struct ShelfItem { 57 struct ShelfItem {
63 // An id, used to correlate windows and shortcuts (eg. 'exe:chrome'). 58 // An id, used to correlate windows and shortcuts (eg. 'exe:chrome').
64 string id; 59 string id;
65 60
66 // A title, used for tooltips, etc. (eg. 'Chrome'). 61 // A title, used for tooltips, etc. (eg. 'Chrome').
67 string title; 62 string title;
68 63
69 // An icon image Bitmap, shown on the shelf. 64 // An icon image Bitmap, shown on the shelf.
70 skia.mojom.Bitmap image; 65 skia.mojom.Bitmap image;
71 66
72 // Additional context menu items (eg. 'New Incognito Window'). 67 // Additional context menu items (eg. 'New Incognito Window').
73 array<ContextMenuItem>? context_menu_items; 68 array<ContextMenuItem>? context_menu_items;
74 }; 69 };
OLDNEW
« no previous file with comments | « mash/shelf/public/interfaces/BUILD.gn ('k') | mash/shelf/public/interfaces/shelf_constants.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698