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

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

Issue 149303003: [Refactor] Move the logic to update bounds for show type from WorkspaceLayoutManager to DefaultState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: handle show_inactive Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/window_state_observer.h ('k') | ash/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_WM_TYPES_H_ 5 #ifndef ASH_WM_WM_TYPES_H_
6 #define ASH_WM_WM_TYPES_H_ 6 #define ASH_WM_WM_TYPES_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ui/base/ui_base_types.h" 9 #include "ui/base/ui_base_types.h"
10 10
(...skipping 25 matching lines...) Expand all
36 SHOW_TYPE_RIGHT_SNAPPED, 36 SHOW_TYPE_RIGHT_SNAPPED,
37 37
38 // A window is in this state when it is automatically placed and 38 // A window is in this state when it is automatically placed and
39 // sized by the window manager. (it's newly opened, or pushed to the side 39 // sized by the window manager. (it's newly opened, or pushed to the side
40 // due to new window, for example). 40 // due to new window, for example).
41 SHOW_TYPE_AUTO_POSITIONED, 41 SHOW_TYPE_AUTO_POSITIONED,
42 }; 42 };
43 43
44 // Set of operations that can change the window's state. 44 // Set of operations that can change the window's state.
45 enum WMEvent { 45 enum WMEvent {
46 // Following events are the request to become corresponding state.
47 // Note that this does not mean the window will be in corresponding
48 // state and the request may not be fullfilled.
49
50 // NORMAL is used as a restore operation with a few exceptions.
51 NORMAL,
52 MAXIMIZE,
53 MINIMIZE,
54 FULLSCREEN,
55 // TODO(oshima): Consolidate these two events.
56 SNAP_LEFT,
57 SNAP_RIGHT,
58
59 // Following events are compond events which may lead to different
60 // states depending on the current state.
61
46 // A user requested to toggle maximized state by double clicking window 62 // A user requested to toggle maximized state by double clicking window
47 // header. 63 // header.
48 TOGGLE_MAXIMIZE_CAPTION, 64 TOGGLE_MAXIMIZE_CAPTION,
49 65
50 // A user requested to toggle maximized state using shortcut. 66 // A user requested to toggle maximized state using shortcut.
51 TOGGLE_MAXIMIZE, 67 TOGGLE_MAXIMIZE,
52 68
53 // A user requested to toggle vertical maximize by double clicking 69 // A user requested to toggle vertical maximize by double clicking
54 // top/bottom edge. 70 // top/bottom edge.
55 TOGGLE_VERTICAL_MAXIMIZE, 71 TOGGLE_VERTICAL_MAXIMIZE,
56 72
57 // A user requested to toggle horizontal maximize by double clicking 73 // A user requested to toggle horizontal maximize by double clicking
58 // left/right edge. 74 // left/right edge.
59 TOGGLE_HORIZONTAL_MAXIMIZE, 75 TOGGLE_HORIZONTAL_MAXIMIZE,
76
77 // A user requested to toggle fullscreen state.
78 TOGGLE_FULLSCREEN,
79
80 // TODO(oshima): Investigate if this can be removed from ash.
81 // Widget requested to show in inactive state.
82 SHOW_INACTIVE,
60 }; 83 };
61 84
62 // Utility functions to convert WindowShowType <-> ui::WindowShowState. 85 // Utility functions to convert WindowShowType <-> ui::WindowShowState.
63 // Note: LEFT/RIGHT MAXIMIZED, AUTO_POSITIONED type will be lost when 86 // Note: LEFT/RIGHT MAXIMIZED, AUTO_POSITIONED type will be lost when
64 // converting to ui::WindowShowState. 87 // converting to ui::WindowShowState.
65 ASH_EXPORT WindowShowType ToWindowShowType(ui::WindowShowState state); 88 ASH_EXPORT WindowShowType ToWindowShowType(ui::WindowShowState state);
66 ASH_EXPORT ui::WindowShowState ToWindowShowState(WindowShowType type); 89 ASH_EXPORT ui::WindowShowState ToWindowShowState(WindowShowType type);
67 90
68 // Returns true if |type| is SHOW_TYPE_MAXIMIZED or SHOW_TYPE_FULLSCREEN. 91 // Returns true if |type| is SHOW_TYPE_MAXIMIZED or SHOW_TYPE_FULLSCREEN.
69 ASH_EXPORT bool IsMaximizedOrFullscreenWindowShowType(WindowShowType type); 92 ASH_EXPORT bool IsMaximizedOrFullscreenWindowShowType(WindowShowType type);
70 93
71 } // namespace wm 94 } // namespace wm
72 } // namespace ash 95 } // namespace ash
73 96
74 #endif // ASH_WM_WM_TYPES_H_ 97 #endif // ASH_WM_WM_TYPES_H_
OLDNEW
« no previous file with comments | « ash/wm/window_state_observer.h ('k') | ash/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698