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

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: 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
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 // A window is requested to become a normal state. This usually invokes
47 // restore operation with a few exceptions.
pkotwicz 2014/02/12 22:27:27 I do not think that the comment: "A window is req
oshima 2014/02/13 14:52:34 Removed individual comments, and added the overvie
48 NORMAL,
49
50 // A window has been requested to become a maximized window.
51 MAXIMIZE,
52
53 // A window has been requested to become a minimized window.
54 MINIMIZE,
55
56 // A window has been requested to become a fullscreen window.
57 FULLSCREEN,
58
59 // A window has been requested to become a left/right snapped window.
60 // TODO(oshima): Consolidate these two events.
61 SNAP_LEFT,
62 SNAP_RIGHT,
63
46 // A user requested to toggle maximized state by double clicking window 64 // A user requested to toggle maximized state by double clicking window
47 // header. 65 // header.
48 TOGGLE_MAXIMIZE_CAPTION, 66 TOGGLE_MAXIMIZE_CAPTION,
49 67
50 // A user requested to toggle maximized state using shortcut. 68 // A user requested to toggle maximized state using shortcut.
51 TOGGLE_MAXIMIZE, 69 TOGGLE_MAXIMIZE,
52 70
53 // A user requested to toggle vertical maximize by double clicking 71 // A user requested to toggle vertical maximize by double clicking
54 // top/bottom edge. 72 // top/bottom edge.
55 TOGGLE_VERTICAL_MAXIMIZE, 73 TOGGLE_VERTICAL_MAXIMIZE,
56 74
57 // A user requested to toggle horizontal maximize by double clicking 75 // A user requested to toggle horizontal maximize by double clicking
58 // left/right edge. 76 // left/right edge.
59 TOGGLE_HORIZONTAL_MAXIMIZE, 77 TOGGLE_HORIZONTAL_MAXIMIZE,
78
79 // A user requested to toggle fullscreen state.
80 TOGGLE_FULLSCREEN,
60 }; 81 };
61 82
62 // Utility functions to convert WindowShowType <-> ui::WindowShowState. 83 // Utility functions to convert WindowShowType <-> ui::WindowShowState.
63 // Note: LEFT/RIGHT MAXIMIZED, AUTO_POSITIONED type will be lost when 84 // Note: LEFT/RIGHT MAXIMIZED, AUTO_POSITIONED type will be lost when
64 // converting to ui::WindowShowState. 85 // converting to ui::WindowShowState.
65 ASH_EXPORT WindowShowType ToWindowShowType(ui::WindowShowState state); 86 ASH_EXPORT WindowShowType ToWindowShowType(ui::WindowShowState state);
66 ASH_EXPORT ui::WindowShowState ToWindowShowState(WindowShowType type); 87 ASH_EXPORT ui::WindowShowState ToWindowShowState(WindowShowType type);
67 88
68 // Returns true if |type| is SHOW_TYPE_MAXIMIZED or SHOW_TYPE_FULLSCREEN. 89 // Returns true if |type| is SHOW_TYPE_MAXIMIZED or SHOW_TYPE_FULLSCREEN.
69 ASH_EXPORT bool IsMaximizedOrFullscreenWindowShowType(WindowShowType type); 90 ASH_EXPORT bool IsMaximizedOrFullscreenWindowShowType(WindowShowType type);
70 91
71 } // namespace wm 92 } // namespace wm
72 } // namespace ash 93 } // namespace ash
73 94
74 #endif // ASH_WM_WM_TYPES_H_ 95 #endif // ASH_WM_WM_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698