Fix incorrect handling of accelerators on constrained web dailogs.
[chromium-blink-merge.git] / ash / launcher / launcher_types.h
blob051d3b355b5398729a97d2cc692c26e2827276b2
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.
5 #ifndef ASH_LAUNCHER_LAUNCHER_TYPES_H_
6 #define ASH_LAUNCHER_LAUNCHER_TYPES_H_
8 #include <vector>
10 #include "ash/ash_export.h"
11 #include "ui/gfx/image/image_skia.h"
13 namespace ash {
15 typedef int LauncherID;
17 // Height of the Launcher. Hard coded to avoid resizing as items are
18 // added/removed.
19 ASH_EXPORT extern const int kLauncherPreferredSize;
21 // Max alpha of the launcher background.
22 ASH_EXPORT extern const int kLauncherBackgroundAlpha;
24 // Type the LauncherItem represents.
25 enum LauncherItemType {
26 // Represents a tabbed browser.
27 TYPE_TABBED,
29 // Represents a running app panel.
30 TYPE_APP_PANEL,
32 // Represents a pinned shortcut to an app.
33 TYPE_APP_SHORTCUT,
35 // Toggles visiblity of the app list.
36 TYPE_APP_LIST,
38 // The browser shortcut button.
39 TYPE_BROWSER_SHORTCUT,
41 // Represents a platform app.
42 TYPE_PLATFORM_APP,
45 // Represents the status of pinned or running app launcher items.
46 enum LauncherItemStatus {
47 // A closed LauncherItem, i.e. has no live instance.
48 STATUS_CLOSED,
49 // A LauncherItem that has live instance.
50 STATUS_RUNNING,
51 // An active LauncherItem that has focus.
52 STATUS_ACTIVE,
53 // A LauncherItem that needs user's attention.
54 STATUS_ATTENTION,
57 struct ASH_EXPORT LauncherItem {
58 LauncherItem();
59 ~LauncherItem();
61 LauncherItemType type;
63 // Whether it is drawn as an incognito icon or not. Only used if this is
64 // TYPE_TABBED. Note: This cannot be used for identifying incognito windows.
65 bool is_incognito;
67 // Image to display in the launcher. If this item is TYPE_TABBED the image is
68 // a favicon image.
69 gfx::ImageSkia image;
71 // Assigned by the model when the item is added.
72 LauncherID id;
74 // Running status.
75 LauncherItemStatus status;
78 typedef std::vector<LauncherItem> LauncherItems;
80 // The direction of the focus cycling.
81 enum CycleDirection {
82 CYCLE_FORWARD,
83 CYCLE_BACKWARD
86 } // namespace ash
88 #endif // ASH_LAUNCHER_LAUNCHER_TYPES_H_