| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef ASH_SHELF_SHELF_ITEM_TYPES_H_ | 5 #ifndef ASH_SHELF_SHELF_ITEM_TYPES_H_ |
| 6 #define ASH_SHELF_SHELF_ITEM_TYPES_H_ | 6 #define ASH_SHELF_SHELF_ITEM_TYPES_H_ |
| 7 | 7 |
| 8 #include <vector> |
| 9 |
| 8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 9 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "ui/gfx/image/image_skia.h" |
| 10 | 13 |
| 11 namespace ash { | 14 namespace ash { |
| 12 | 15 |
| 16 typedef int ShelfID; |
| 17 |
| 13 // The type of a shelf item. | 18 // The type of a shelf item. |
| 14 enum ShelfItemType { | 19 enum ShelfItemType { |
| 15 // Represents a running app panel. | 20 // Represents a running app panel. |
| 16 TYPE_APP_PANEL, | 21 TYPE_APP_PANEL, |
| 17 | 22 |
| 18 // Represents a pinned shortcut to an app. | 23 // Represents a pinned shortcut to an app. |
| 19 TYPE_APP_SHORTCUT, | 24 TYPE_APP_SHORTCUT, |
| 20 | 25 |
| 21 // Toggles visiblity of the app list. | 26 // Toggles visiblity of the app list. |
| 22 TYPE_APP_LIST, | 27 TYPE_APP_LIST, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 42 // A closed shelf item, i.e. has no live instance. | 47 // A closed shelf item, i.e. has no live instance. |
| 43 STATUS_CLOSED, | 48 STATUS_CLOSED, |
| 44 // A shelf item that has live instance. | 49 // A shelf item that has live instance. |
| 45 STATUS_RUNNING, | 50 STATUS_RUNNING, |
| 46 // An active shelf item that has focus. | 51 // An active shelf item that has focus. |
| 47 STATUS_ACTIVE, | 52 STATUS_ACTIVE, |
| 48 // A shelf item that needs user's attention. | 53 // A shelf item that needs user's attention. |
| 49 STATUS_ATTENTION, | 54 STATUS_ATTENTION, |
| 50 }; | 55 }; |
| 51 | 56 |
| 57 struct ASH_EXPORT ShelfItem { |
| 58 ShelfItem(); |
| 59 ~ShelfItem(); |
| 60 |
| 61 ShelfItemType type; |
| 62 |
| 63 // Image to display in the shelf. |
| 64 gfx::ImageSkia image; |
| 65 |
| 66 // Assigned by the model when the item is added. |
| 67 ShelfID id; |
| 68 |
| 69 // Running status. |
| 70 ShelfItemStatus status; |
| 71 }; |
| 72 |
| 73 typedef std::vector<ShelfItem> ShelfItems; |
| 74 |
| 52 // ShelfItemDetails may be set on Window (by way of | 75 // ShelfItemDetails may be set on Window (by way of |
| 53 // SetShelfItemDetailsForWindow) to make the window appear in the shelf. See | 76 // SetShelfItemDetailsForWindow) to make the window appear in the shelf. See |
| 54 // ShelfWindowWatcher for details. | 77 // ShelfWindowWatcher for details. |
| 55 struct ASH_EXPORT ShelfItemDetails { | 78 struct ASH_EXPORT ShelfItemDetails { |
| 56 ShelfItemDetails(); | 79 ShelfItemDetails(); |
| 57 ~ShelfItemDetails(); | 80 ~ShelfItemDetails(); |
| 58 | 81 |
| 59 ShelfItemType type; | 82 ShelfItemType type; |
| 60 | 83 |
| 61 // Resource id of the image to display on the shelf. | 84 // Resource id of the image to display on the shelf. |
| 62 int image_resource_id; | 85 int image_resource_id; |
| 63 | 86 |
| 64 // Title of the item. | 87 // Title of the item. |
| 65 base::string16 title; | 88 base::string16 title; |
| 66 }; | 89 }; |
| 67 | 90 |
| 68 } // namespace ash | 91 } // namespace ash |
| 69 | 92 |
| 70 #endif // ASH_SHELF_SHELF_ITEM_TYPES_H_ | 93 #endif // ASH_SHELF_SHELF_ITEM_TYPES_H_ |
| OLD | NEW |