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 3 // found in the LICENSE file. 4 5 #ifndef ASH_WM_WM_TYPES_H_ 6 #define ASH_WM_WM_TYPES_H_ 7 8 #include "ui/base/ui_base_types.h" 9 10 namespace ash { 11 namespace wm { 12 13 // This enum defines both common show state copied from 14 // ui::WindowShowState as well as new states intoruduced in ash. 15 // The separate enum is defined here because we don't want to leak 16 // these type to ui/base until they're stable and we know for sure 17 // that they'll persist over time. 18 enum WindowShowType { 19 // Common state 20 SHOW_TYPE_DEFAULT = 0, 21 22 // Normal represents a state where the position/size has been 23 // specified by a use. 24 SHOW_TYPE_NORMAL, 25 SHOW_TYPE_MINIMIZED, 26 SHOW_TYPE_MAXIMIZED, 27 SHOW_TYPE_INACTIVE, 28 SHOW_TYPE_FULLSCREEN, 29 SHOW_TYPE_DETACHED, 30 SHOW_TYPE_END, // to avoid using SHOW_STATE_END 31 32 // Ash specific states: 33 34 SHOW_TYPE_LEFT_SNAPPED, 35 SHOW_TYPE_RIGHT_SNAPPED, 36 37 // A window is in this state when it is automatically placed and 38 // sized by the window manager. (it's newly opened, or pushed to the side 39 // due to new window, for example). 40 SHOW_TYPE_AUTO_POSITIONED, 41 }; 42 43 // Utility functions to convert WindowShowType <-> ui::WindowShowState. 44 // Note: LEFT/RIGHT MAXIMIZED, AUTO_POSITIONED type will be lost when 45 // converting to ui::WindowShowState. 46 WindowShowType ToWindowShowType(ui::WindowShowState state); 47 ui::WindowShowState ToWindowShowState(WindowShowType type); 48 49 } // namespace 50 } // namespace 51 52 #endif // ASH_WM_WM_TYPES_H_ 53