1 // Copyright (c) 2012 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_LAUNCHER_LAUNCHER_TYPES_H_ 6 #define ASH_LAUNCHER_LAUNCHER_TYPES_H_ 7 8 #include <vector> 9 10 #include "ash/ash_export.h" 11 #include "ui/gfx/image/image_skia.h" 12 13 namespace ash { 14 15 typedef int LauncherID; 16 17 // Height of the Launcher. Hard coded to avoid resizing as items are 18 // added/removed. 19 ASH_EXPORT extern const int kLauncherPreferredSize; 20 21 // Max alpha of the launcher background. 22 ASH_EXPORT extern const int kLauncherBackgroundAlpha; 23 24 // Type the LauncherItem represents. 25 enum LauncherItemType { 26 // Represents a tabbed browser. 27 TYPE_TABBED, 28 29 // Represents a running app panel. 30 TYPE_APP_PANEL, 31 32 // Represents a pinned shortcut to an app. 33 TYPE_APP_SHORTCUT, 34 35 // Toggles visiblity of the app list. 36 TYPE_APP_LIST, 37 38 // The browser shortcut button. 39 TYPE_BROWSER_SHORTCUT, 40 41 // Represents a platform app. 42 TYPE_PLATFORM_APP, 43 44 // Represents a windowed V1 browser app. 45 TYPE_WINDOWED_APP, 46 }; 47 48 // Represents the status of pinned or running app launcher items. 49 enum LauncherItemStatus { 50 // A closed LauncherItem, i.e. has no live instance. 51 STATUS_CLOSED, 52 // A LauncherItem that has live instance. 53 STATUS_RUNNING, 54 // An active LauncherItem that has focus. 55 STATUS_ACTIVE, 56 // A LauncherItem that needs user's attention. 57 STATUS_ATTENTION, 58 }; 59 60 struct ASH_EXPORT LauncherItem { 61 LauncherItem(); 62 ~LauncherItem(); 63 64 LauncherItemType type; 65 66 // Whether it is drawn as an incognito icon or not. Only used if this is 67 // TYPE_TABBED. Note: This cannot be used for identifying incognito windows. 68 bool is_incognito; 69 70 // Image to display in the launcher. If this item is TYPE_TABBED the image is 71 // a favicon image. 72 gfx::ImageSkia image; 73 74 // Assigned by the model when the item is added. 75 LauncherID id; 76 77 // Running status. 78 LauncherItemStatus status; 79 }; 80 81 typedef std::vector<LauncherItem> LauncherItems; 82 83 // The direction of the focus cycling. 84 enum CycleDirection { 85 CYCLE_FORWARD, 86 CYCLE_BACKWARD 87 }; 88 89 } // namespace ash 90 91 #endif // ASH_LAUNCHER_LAUNCHER_TYPES_H_ 92