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

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

Issue 2889673002: chromeos: Refactor shelf to create ShelfView earlier in startup (Closed)
Patch Set: Move ShelfView to initializer list Created 3 years, 7 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 | « no previous file | ash/root_window_controller.h » ('j') | ash/root_window_controller.h » ('J')
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 ash.mojom; 5 module ash.mojom;
6 6
7 import "mojo/common/string16.mojom"; 7 import "mojo/common/string16.mojom";
8 import "skia/public/interfaces/bitmap.mojom"; 8 import "skia/public/interfaces/bitmap.mojom";
9 import "ui/events/mojo/event.mojom"; 9 import "ui/events/mojo/event.mojom";
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide, int64 display_id); 66 SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide, int64 display_id);
67 67
68 // Pin and unpin items on the shelf, or update shelf item images. 68 // Pin and unpin items on the shelf, or update shelf item images.
69 PinItem(ShelfItem item, associated ShelfItemDelegate delegate); 69 PinItem(ShelfItem item, associated ShelfItemDelegate delegate);
70 UnpinItem(string app_id); 70 UnpinItem(string app_id);
71 SetItemImage(string app_id, skia.mojom.Bitmap image); 71 SetItemImage(string app_id, skia.mojom.Bitmap image);
72 }; 72 };
73 73
74 // ShelfObserver is notified on shelf changes; used to persist profile settings. 74 // ShelfObserver is notified on shelf changes; used to persist profile settings.
75 interface ShelfObserver { 75 interface ShelfObserver {
76 OnShelfCreated(int64 display_id); 76 // TODO(jamescook): Eliminate all these methods and use the ash pref service
77 // to observe and to set prefs.
James Cook 2017/05/16 21:32:35 I think this could dramatically simplify ash/chrom
msw 2017/05/16 22:41:59 Acknowledged. Maybe file a bug to track that idea
James Cook 2017/05/17 16:16:12 Done.
78 OnShelfInitialized(int64 display_id);
77 OnAlignmentChanged(ShelfAlignment alignment, int64 display_id); 79 OnAlignmentChanged(ShelfAlignment alignment, int64 display_id);
78 OnAutoHideBehaviorChanged(ShelfAutoHideBehavior auto_hide, int64 display_id); 80 OnAutoHideBehaviorChanged(ShelfAutoHideBehavior auto_hide, int64 display_id);
79 }; 81 };
80 82
81 // ShelfItemDelegate handles shelf item selection, menu command execution, etc. 83 // ShelfItemDelegate handles shelf item selection, menu command execution, etc.
82 interface ShelfItemDelegate { 84 interface ShelfItemDelegate {
83 // Called when the user selects a shelf item. The event, display, and source 85 // Called when the user selects a shelf item. The event, display, and source
84 // info should be provided if known; some implementations use these arguments. 86 // info should be provided if known; some implementations use these arguments.
85 // Defaults: (nullptr, kInvalidDisplayId, LAUNCH_FROM_UNKNOWN) 87 // Defaults: (nullptr, kInvalidDisplayId, LAUNCH_FROM_UNKNOWN)
86 // The callback reports the action taken and any app menu items to show. 88 // The callback reports the action taken and any app menu items to show.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 struct ShelfItem { 131 struct ShelfItem {
130 ShelfItemType type; // The type of the shelf item. 132 ShelfItemType type; // The type of the shelf item.
131 skia.mojom.Bitmap image; // An icon image Bitmap, shown on the shelf. 133 skia.mojom.Bitmap image; // An icon image Bitmap, shown on the shelf.
132 ShelfItemStatus status; // The running/closed/etc. status of the item. 134 ShelfItemStatus status; // The running/closed/etc. status of the item.
133 ShelfID shelf_id; // The id for the shelf item and its windows. 135 ShelfID shelf_id; // The id for the shelf item and its windows.
134 mojo.common.mojom.String16 title; // The title to display for tooltips, etc. 136 mojo.common.mojom.String16 title; // The title to display for tooltips, etc.
135 bool shows_tooltip; // Whether the tooltip should be shown on hover. 137 bool shows_tooltip; // Whether the tooltip should be shown on hover.
136 bool pinned_by_policy; // Whether the item is pinned by policy preferences, 138 bool pinned_by_policy; // Whether the item is pinned by policy preferences,
137 // the user cannot un-pin these items. 139 // the user cannot un-pin these items.
138 }; 140 };
OLDNEW
« no previous file with comments | « no previous file | ash/root_window_controller.h » ('j') | ash/root_window_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698