Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_WINDOW_PROPERTIES_H_ | 5 #ifndef ASH_PUBLIC_CPP_WINDOW_PROPERTIES_H_ |
| 6 #define ASH_PUBLIC_CPP_WINDOW_PROPERTIES_H_ | 6 #define ASH_PUBLIC_CPP_WINDOW_PROPERTIES_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "ash/public/cpp/ash_public_export.h" | 10 #include "ash/public/cpp/ash_public_export.h" |
| 11 #include "ash/public/cpp/shelf_types.h" | 11 #include "ash/public/cpp/shelf_types.h" |
| 12 #include "ash/public/interfaces/window_pin_type.mojom.h" | |
|
sky
2017/04/04 17:04:56
forward declare enum?
Peng
2017/04/04 17:38:00
Done.
| |
| 12 #include "ui/base/class_property.h" | 13 #include "ui/base/class_property.h" |
| 13 | 14 |
| 14 namespace aura { | 15 namespace aura { |
| 15 template <typename T> | 16 template <typename T> |
| 16 using WindowProperty = ui::ClassProperty<T>; | 17 using WindowProperty = ui::ClassProperty<T>; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace ash { | 20 namespace ash { |
| 20 | 21 |
| 21 // Shell-specific window property keys for use by ash and its clients. | 22 // Shell-specific window property keys for use by ash and its clients. |
| 22 | 23 |
| 23 // Alphabetical sort. | 24 // Alphabetical sort. |
| 24 | 25 |
| 25 // If true (and the window is a panel), it's attached to its shelf item. | 26 // If true (and the window is a panel), it's attached to its shelf item. |
| 26 ASH_PUBLIC_EXPORT extern const aura::WindowProperty<bool>* const | 27 ASH_PUBLIC_EXPORT extern const aura::WindowProperty<bool>* const |
| 27 kPanelAttachedKey; | 28 kPanelAttachedKey; |
| 28 | 29 |
| 29 // A property key to store the type of a window's shelf item. | 30 // A property key to store the type of a window's shelf item. |
| 30 ASH_PUBLIC_EXPORT extern const aura::WindowProperty<int32_t>* const | 31 ASH_PUBLIC_EXPORT extern const aura::WindowProperty<int32_t>* const |
| 31 kShelfItemTypeKey; | 32 kShelfItemTypeKey; |
| 32 | 33 |
| 34 // A property key to store ash::WindowPinType for a window. | |
| 35 // When setting this property to PINNED or TRUSTED_PINNED, the window manager | |
| 36 // will try to fullscreen the window and pin it on the top of the screen. If the | |
| 37 // window manager failed to do it, the property will be restored to NONE. When | |
| 38 // setting this property to NONE, the window manager will restore the window. | |
| 39 ASH_PUBLIC_EXPORT extern const aura::WindowProperty< | |
| 40 ash::mojom::WindowPinType>* const kWindowPinTypeKey; | |
| 41 | |
| 33 // Alphabetical sort. | 42 // Alphabetical sort. |
| 34 | 43 |
| 35 } // namespace ash | 44 } // namespace ash |
| 36 | 45 |
| 37 #endif // ASH_PUBLIC_CPP_WINDOW_PROPERTIES_H_ | 46 #endif // ASH_PUBLIC_CPP_WINDOW_PROPERTIES_H_ |
| OLD | NEW |