OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_SHELF_SHELF_ITEM_TYPES_H_ | |
6 #define ASH_SHELF_SHELF_ITEM_TYPES_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "ash/ash_export.h" | |
11 #include "base/strings/string16.h" | |
12 #include "ui/gfx/image/image_skia.h" | |
13 | |
14 namespace ash { | |
15 | |
16 typedef int ShelfID; | |
17 | |
18 // The type of a shelf item. | |
19 enum ShelfItemType { | |
20 // Represents a running app panel. | |
21 TYPE_APP_PANEL, | |
22 | |
23 // Represents a pinned shortcut to an app. | |
24 TYPE_APP_SHORTCUT, | |
25 | |
26 // Toggles visiblity of the app list. | |
27 TYPE_APP_LIST, | |
28 | |
29 // The browser shortcut button. | |
30 TYPE_BROWSER_SHORTCUT, | |
31 | |
32 // Represents a platform app. | |
33 TYPE_PLATFORM_APP, | |
34 | |
35 // Represents a windowed V1 browser app. | |
36 TYPE_WINDOWED_APP, | |
37 | |
38 // Represents a dialog. | |
39 TYPE_DIALOG, | |
40 | |
41 // The expanded IME menu in the shelf. | |
42 TYPE_IME_MENU, | |
43 | |
44 // Default value. | |
45 TYPE_UNDEFINED, | |
46 }; | |
47 | |
48 // Represents the status of applications in the shelf. | |
49 enum ShelfItemStatus { | |
50 // A closed shelf item, i.e. has no live instance. | |
51 STATUS_CLOSED, | |
52 // A shelf item that has live instance. | |
53 STATUS_RUNNING, | |
54 // An active shelf item that has focus. | |
55 STATUS_ACTIVE, | |
56 // A shelf item that needs user's attention. | |
57 STATUS_ATTENTION, | |
58 }; | |
59 | |
60 struct ASH_EXPORT ShelfItem { | |
61 ShelfItem(); | |
62 ~ShelfItem(); | |
63 | |
64 ShelfItemType type; | |
65 | |
66 // Image to display in the shelf. | |
67 gfx::ImageSkia image; | |
68 | |
69 // Assigned by the model when the item is added. | |
70 ShelfID id; | |
71 | |
72 // Running status. | |
73 ShelfItemStatus status; | |
74 }; | |
75 | |
76 typedef std::vector<ShelfItem> ShelfItems; | |
77 | |
78 // ShelfItemDetails may be set on Window (by way of | |
79 // SetShelfItemDetailsForWindow) to make the window appear in the shelf. See | |
80 // ShelfWindowWatcher for details. | |
81 struct ASH_EXPORT ShelfItemDetails { | |
82 ShelfItemDetails(); | |
83 ~ShelfItemDetails(); | |
84 | |
85 ShelfItemType type; | |
86 | |
87 // Resource id of the image to display on the shelf. | |
88 int image_resource_id; | |
89 | |
90 // Title of the item. | |
91 base::string16 title; | |
92 }; | |
93 | |
94 } // namespace ash | |
95 | |
96 #endif // ASH_SHELF_SHELF_ITEM_TYPES_H_ | |
OLD | NEW |