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

Side by Side Diff: ash/wm/wm_types.h

Issue 1891283002: Moves WmTypes to ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 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
« no previous file with comments | « ash/wm/window_state_observer.h ('k') | ash/wm/wm_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 "ash/ash_export.h"
9 #include "ui/base/ui_base_types.h"
10
11 // TODO(sky): move to common.
12 namespace ash {
13 namespace wm {
14
15 // This enum defines both common show state copied from
16 // ui::WindowShowState as well as new states introduced in ash.
17 // 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
19 // that they'll persist over time.
20 enum WindowStateType {
21 // Common state
22 WINDOW_STATE_TYPE_DEFAULT = 0,
23
24 // Normal represents a state where the position/size has been
25 // specified by a use.
26 WINDOW_STATE_TYPE_NORMAL,
27 WINDOW_STATE_TYPE_MINIMIZED,
28 WINDOW_STATE_TYPE_MAXIMIZED,
29 WINDOW_STATE_TYPE_INACTIVE,
30 WINDOW_STATE_TYPE_FULLSCREEN,
31 WINDOW_STATE_TYPE_DOCKED,
32 WINDOW_STATE_TYPE_END, // to avoid using SHOW_STATE_END
33
34 // Ash specific states:
35
36 WINDOW_STATE_TYPE_LEFT_SNAPPED,
37 WINDOW_STATE_TYPE_RIGHT_SNAPPED,
38
39 WINDOW_STATE_TYPE_DOCKED_MINIMIZED,
40
41 // 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
43 // due to new window, for example).
44 WINDOW_STATE_TYPE_AUTO_POSITIONED,
45 };
46
47 // Utility functions to convert WindowStateType <-> ui::WindowShowState.
48 // Note: LEFT/RIGHT MAXIMIZED, AUTO_POSITIONED type will be lost when
49 // converting to ui::WindowShowState.
50 ASH_EXPORT WindowStateType ToWindowStateType(ui::WindowShowState state);
51 ASH_EXPORT ui::WindowShowState ToWindowShowState(WindowStateType type);
52
53 // Returns true if |type| is WINDOW_STATE_TYPE_MAXIMIZED or
54 // WINDOW_STATE_TYPE_FULLSCREEN.
55 ASH_EXPORT bool IsMaximizedOrFullscreenWindowStateType(WindowStateType type);
56
57 } // namespace wm
58 } // namespace ash
59
60 #endif // ASH_WM_WM_TYPES_H_
OLDNEW
« no previous file with comments | « ash/wm/window_state_observer.h ('k') | ash/wm/wm_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698