forked from sanyaade-mobiledev/chromium.src
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlauncher_types.h
94 lines (70 loc) · 2.23 KB
/
launcher_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_LAUNCHER_LAUNCHER_TYPES_H_
#define ASH_LAUNCHER_LAUNCHER_TYPES_H_
#include <vector>
#include "ash/ash_export.h"
#include "ui/gfx/image/image_skia.h"
namespace aura {
class Window;
}
namespace ash {
typedef int LauncherID;
// Height of the Launcher. Hard coded to avoid resizing as items are
// added/removed.
ASH_EXPORT extern const int kLauncherPreferredSize;
// Type the LauncherItem represents.
enum LauncherItemType {
// Represents a tabbed browser.
TYPE_TABBED,
// Represents a running app panel.
TYPE_APP_PANEL,
// Represents a pinned shortcut to an app.
TYPE_APP_SHORTCUT,
// Toggles visiblity of the app list.
TYPE_APP_LIST,
// The browser shortcut button.
TYPE_BROWSER_SHORTCUT,
// Represents a platform app.
TYPE_PLATFORM_APP,
};
// Represents the status of pinned or running app launcher items.
enum LauncherItemStatus {
// A closed LauncherItem, i.e. has no live instance.
STATUS_CLOSED,
// A LauncherItem that has live instance.
STATUS_RUNNING,
// An active LauncherItem that has focus.
STATUS_ACTIVE,
// A LauncherItem that needs user's attention.
STATUS_ATTENTION,
// A LauncherItem that has pending operations.
// e.g. A TYEE_APP_SHORTCUT item whose application is
// being installed/upgraded.
// Note STATUS_PENDING is a macro in WinNT.h on Windows.
STATUS_IS_PENDING,
};
struct ASH_EXPORT LauncherItem {
LauncherItem();
~LauncherItem();
LauncherItemType type;
// Whether it is drawn as an incognito icon or not. Only used if this is
// TYPE_TABBED. Note: This cannot be used for identifying incognito windows.
bool is_incognito;
// Image to display in the launcher. If this item is TYPE_TABBED the image is
// a favicon image.
gfx::ImageSkia image;
// Assigned by the model when the item is added.
LauncherID id;
// Running status.
LauncherItemStatus status;
};
typedef std::vector<LauncherItem> LauncherItems;
// The direction of the focus cycling.
enum CycleDirection {
CYCLE_FORWARD,
CYCLE_BACKWARD
};
} // namespace ash
#endif // ASH_LAUNCHER_LAUNCHER_TYPES_H_