Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: ash/public/cpp/shelf_types.h

Issue 2860503002: mash: Replace int ShelfIDs with AppLaunchID strings. (Closed)
Patch Set: Restore AppLaunchId class via using ShelfID = AppLaunchId; cleanup. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_PUBLIC_CPP_SHELF_TYPES_H_ 5 #ifndef ASH_PUBLIC_CPP_SHELF_TYPES_H_
6 #define ASH_PUBLIC_CPP_SHELF_TYPES_H_ 6 #define ASH_PUBLIC_CPP_SHELF_TYPES_H_
7 7
8 #include <cstdint> 8 #include <cstdint>
9 #include <string>
msw 2017/05/04 14:17:30 self nit: removed
James Cook 2017/05/04 16:38:48 Huh?
msw 2017/05/04 19:05:57 Ha, sorry, I was up really late working on this an
9 10
11 #include "ash/public/cpp/app_launch_id.h"
10 #include "ash/public/cpp/ash_public_export.h" 12 #include "ash/public/cpp/ash_public_export.h"
11 13
12 namespace ash { 14 namespace ash {
13 15
14 enum ShelfAlignment { 16 enum ShelfAlignment {
15 SHELF_ALIGNMENT_BOTTOM, 17 SHELF_ALIGNMENT_BOTTOM,
16 SHELF_ALIGNMENT_LEFT, 18 SHELF_ALIGNMENT_LEFT,
17 SHELF_ALIGNMENT_RIGHT, 19 SHELF_ALIGNMENT_RIGHT,
18 // Top has never been supported. 20 // Top has never been supported.
19 21
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // An existing inactive window was activated. 84 // An existing inactive window was activated.
83 SHELF_ACTION_WINDOW_ACTIVATED, 85 SHELF_ACTION_WINDOW_ACTIVATED,
84 86
85 // The currently active window was minimized. 87 // The currently active window was minimized.
86 SHELF_ACTION_WINDOW_MINIMIZED, 88 SHELF_ACTION_WINDOW_MINIMIZED,
87 89
88 // The app list launcher menu was shown. 90 // The app list launcher menu was shown.
89 SHELF_ACTION_APP_LIST_SHOWN, 91 SHELF_ACTION_APP_LIST_SHOWN,
90 }; 92 };
91 93
92 // Shelf IDs are sequential values assigned to shelf items by ShelfModel for 94 // TODO(msw): Rename AppLaunchId to ShelfID.
93 // runtime use; they are not persisted across restarts of the ash environment. 95 using ShelfID = AppLaunchId;
94 using ShelfID = uint32_t;
95 const ShelfID kInvalidShelfID = 0u;
96 96
97 // The type of a shelf item. 97 // The type of a shelf item.
98 enum ShelfItemType { 98 enum ShelfItemType {
99 // Represents a running app panel. 99 // Represents a running app panel.
100 TYPE_APP_PANEL, 100 TYPE_APP_PANEL,
101 101
102 // Represents a pinned shortcut to an app, the app may be running or not. 102 // Represents a pinned shortcut to an app, the app may be running or not.
103 TYPE_PINNED_APP, 103 TYPE_PINNED_APP,
104 104
105 // Toggles visiblity of the app list. 105 // Toggles visiblity of the app list.
(...skipping 26 matching lines...) Expand all
132 STATUS_RUNNING, 132 STATUS_RUNNING,
133 // An active shelf item that has focus. 133 // An active shelf item that has focus.
134 STATUS_ACTIVE, 134 STATUS_ACTIVE,
135 // A shelf item that needs user's attention. 135 // A shelf item that needs user's attention.
136 STATUS_ATTENTION, 136 STATUS_ATTENTION,
137 }; 137 };
138 138
139 } // namespace ash 139 } // namespace ash
140 140
141 #endif // ASH_PUBLIC_CPP_SHELF_TYPES_H_ 141 #endif // ASH_PUBLIC_CPP_SHELF_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698