| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WM_COMMON_WM_TYPES_H_ | 5 #ifndef ASH_WM_COMMON_WM_TYPES_H_ |
| 6 #define ASH_WM_COMMON_WM_TYPES_H_ | 6 #define ASH_WM_COMMON_WM_TYPES_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/wm/common/ash_wm_common_export.h" |
| 9 #include "ui/base/ui_base_types.h" | 9 #include "ui/base/ui_base_types.h" |
| 10 | 10 |
| 11 // TODO(sky): move to common. | |
| 12 namespace ash { | 11 namespace ash { |
| 13 namespace wm { | 12 namespace wm { |
| 14 | 13 |
| 15 // This enum defines both common show state copied from | 14 // This enum defines both common show state copied from |
| 16 // ui::WindowShowState as well as new states introduced in ash. | 15 // ui::WindowShowState as well as new states introduced in ash. |
| 17 // The separate enum is defined here because we don't want to leak | 16 // The separate enum is defined here because we don't want to leak |
| 18 // these type to ui/base until they're stable and we know for sure | 17 // these type to ui/base until they're stable and we know for sure |
| 19 // that they'll persist over time. | 18 // that they'll persist over time. |
| 20 enum WindowStateType { | 19 enum WindowStateType { |
| 21 // Common state | 20 // Common state |
| (...skipping 18 matching lines...) Expand all Loading... |
| 40 | 39 |
| 41 // A window is in this state when it is automatically placed and | 40 // A window is in this state when it is automatically placed and |
| 42 // sized by the window manager. (it's newly opened, or pushed to the side | 41 // sized by the window manager. (it's newly opened, or pushed to the side |
| 43 // due to new window, for example). | 42 // due to new window, for example). |
| 44 WINDOW_STATE_TYPE_AUTO_POSITIONED, | 43 WINDOW_STATE_TYPE_AUTO_POSITIONED, |
| 45 }; | 44 }; |
| 46 | 45 |
| 47 // Utility functions to convert WindowStateType <-> ui::WindowShowState. | 46 // Utility functions to convert WindowStateType <-> ui::WindowShowState. |
| 48 // Note: LEFT/RIGHT MAXIMIZED, AUTO_POSITIONED type will be lost when | 47 // Note: LEFT/RIGHT MAXIMIZED, AUTO_POSITIONED type will be lost when |
| 49 // converting to ui::WindowShowState. | 48 // converting to ui::WindowShowState. |
| 50 ASH_EXPORT WindowStateType ToWindowStateType(ui::WindowShowState state); | 49 ASH_WM_COMMON_EXPORT WindowStateType |
| 51 ASH_EXPORT ui::WindowShowState ToWindowShowState(WindowStateType type); | 50 ToWindowStateType(ui::WindowShowState state); |
| 51 ASH_WM_COMMON_EXPORT ui::WindowShowState ToWindowShowState( |
| 52 WindowStateType type); |
| 52 | 53 |
| 53 // Returns true if |type| is WINDOW_STATE_TYPE_MAXIMIZED or | 54 // Returns true if |type| is WINDOW_STATE_TYPE_MAXIMIZED or |
| 54 // WINDOW_STATE_TYPE_FULLSCREEN. | 55 // WINDOW_STATE_TYPE_FULLSCREEN. |
| 55 ASH_EXPORT bool IsMaximizedOrFullscreenWindowStateType(WindowStateType type); | 56 ASH_WM_COMMON_EXPORT bool IsMaximizedOrFullscreenWindowStateType( |
| 57 WindowStateType type); |
| 56 | 58 |
| 57 } // namespace wm | 59 } // namespace wm |
| 58 } // namespace ash | 60 } // namespace ash |
| 59 | 61 |
| 60 #endif // ASH_WM_COMMON_WM_TYPES_H_ | 62 #endif // ASH_WM_COMMON_WM_TYPES_H_ |
| OLD | NEW |