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

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

Issue 2702423004: Validate incoming window properties. (Closed)
Patch Set: rebase to tot Created 3 years, 10 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>
9
10 #include "ash/public/cpp/ash_public_export.h"
11 #include "base/callback_forward.h"
12
8 namespace ash { 13 namespace ash {
9 14
10 enum ShelfAlignment { 15 enum ShelfAlignment {
11 SHELF_ALIGNMENT_BOTTOM, 16 SHELF_ALIGNMENT_BOTTOM,
12 SHELF_ALIGNMENT_LEFT, 17 SHELF_ALIGNMENT_LEFT,
13 SHELF_ALIGNMENT_RIGHT, 18 SHELF_ALIGNMENT_RIGHT,
14 // Top has never been supported. 19 // Top has never been supported.
15 20
16 // The locked alignment is set temporarily and not saved to preferences. 21 // The locked alignment is set temporarily and not saved to preferences.
17 SHELF_ALIGNMENT_BOTTOM_LOCKED, 22 SHELF_ALIGNMENT_BOTTOM_LOCKED,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // ARC (App Runtime for Chrome - Android Play Store) apps. 112 // ARC (App Runtime for Chrome - Android Play Store) apps.
108 TYPE_APP, 113 TYPE_APP,
109 114
110 // Represents a dialog. 115 // Represents a dialog.
111 TYPE_DIALOG, 116 TYPE_DIALOG,
112 117
113 // Default value. 118 // Default value.
114 TYPE_UNDEFINED, 119 TYPE_UNDEFINED,
115 }; 120 };
116 121
122 // Returns a callback which will return true if the value passed to it is a
123 // valid ShelfItemType value.
124 ASH_PUBLIC_EXPORT base::RepeatingCallback<bool(int32_t)>
sky 2017/02/23 21:02:25 Why expose a callback here? I certainly get wantin
Elliot Glaysher 2017/02/23 22:12:42 Done.
125 ValidateShelfItemType();
126
117 // Represents the status of applications in the shelf. 127 // Represents the status of applications in the shelf.
118 enum ShelfItemStatus { 128 enum ShelfItemStatus {
119 // A closed shelf item, i.e. has no live instance. 129 // A closed shelf item, i.e. has no live instance.
120 STATUS_CLOSED, 130 STATUS_CLOSED,
121 // A shelf item that has live instance. 131 // A shelf item that has live instance.
122 STATUS_RUNNING, 132 STATUS_RUNNING,
123 // An active shelf item that has focus. 133 // An active shelf item that has focus.
124 STATUS_ACTIVE, 134 STATUS_ACTIVE,
125 // A shelf item that needs user's attention. 135 // A shelf item that needs user's attention.
126 STATUS_ATTENTION, 136 STATUS_ATTENTION,
127 }; 137 };
128 138
129 } // namespace ash 139 } // namespace ash
130 140
131 #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