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

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

Issue 11085053: Improving window auto management between workspaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try Created 8 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WINDOW_UTIL_H_ 5 #ifndef ASH_WM_WINDOW_UTIL_H_
6 #define ASH_WM_WINDOW_UTIL_H_ 6 #define ASH_WM_WINDOW_UTIL_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/base/ui_base_types.h" 10 #include "ui/base/ui_base_types.h"
(...skipping 18 matching lines...) Expand all
29 ASH_EXPORT bool CanActivateWindow(aura::Window* window); 29 ASH_EXPORT bool CanActivateWindow(aura::Window* window);
30 30
31 // Retrieves the activatable window for |window|. If |window| is activatable, 31 // Retrieves the activatable window for |window|. If |window| is activatable,
32 // this will just return it, otherwise it will climb the parent/transient parent 32 // this will just return it, otherwise it will climb the parent/transient parent
33 // chain looking for a window that is activatable, per the ActivationController. 33 // chain looking for a window that is activatable, per the ActivationController.
34 // If you're looking for a function to get the activatable "top level" window, 34 // If you're looking for a function to get the activatable "top level" window,
35 // this is probably what you're looking for. 35 // this is probably what you're looking for.
36 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); 36 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window);
37 37
38 // Returns true if |window| can be maximized. 38 // Returns true if |window| can be maximized.
39 ASH_EXPORT bool CanMaximizeWindow(aura::Window* window); 39 ASH_EXPORT bool CanMaximizeWindow(const aura::Window* window);
40 40
41 // Returns true if |window| is normal or default. 41 // Returns true if |window| is normal or default.
42 ASH_EXPORT bool IsWindowNormal(aura::Window* window); 42 ASH_EXPORT bool IsWindowNormal(const aura::Window* window);
43 43
44 // Returns true if |state| is normal or default. 44 // Returns true if |state| is normal or default.
45 ASH_EXPORT bool IsWindowStateNormal(ui::WindowShowState state); 45 ASH_EXPORT bool IsWindowStateNormal(const ui::WindowShowState state);
46 46
47 // Returns true if |window| is in the maximized state. 47 // Returns true if |window| is in the maximized state.
48 ASH_EXPORT bool IsWindowMaximized(aura::Window* window); 48 ASH_EXPORT bool IsWindowMaximized(const aura::Window* window);
49 49
50 // Returns true if |window| is minimized. 50 // Returns true if |window| is minimized.
51 ASH_EXPORT bool IsWindowMinimized(aura::Window* window); 51 ASH_EXPORT bool IsWindowMinimized(const aura::Window* window);
52 52
53 // Returns true if |window| is in the fullscreen state. 53 // Returns true if |window| is in the fullscreen state.
54 ASH_EXPORT bool IsWindowFullscreen(aura::Window* window); 54 ASH_EXPORT bool IsWindowFullscreen(const aura::Window* window);
55 55
56 // Maximizes |window|, which must not be NULL. 56 // Maximizes |window|, which must not be NULL.
57 ASH_EXPORT void MaximizeWindow(aura::Window* window); 57 ASH_EXPORT void MaximizeWindow(aura::Window* window);
58 58
59 // Minimizes |window|, which must not be NULL. 59 // Minimizes |window|, which must not be NULL.
60 ASH_EXPORT void MinimizeWindow(aura::Window* window); 60 ASH_EXPORT void MinimizeWindow(aura::Window* window);
61 61
62 // Restores |window|, which must not be NULL. 62 // Restores |window|, which must not be NULL.
63 ASH_EXPORT void RestoreWindow(aura::Window* window); 63 ASH_EXPORT void RestoreWindow(aura::Window* window);
64 64
(...skipping 11 matching lines...) Expand all
76 // As a result of this |window| has freshly created layers, meaning the layers 76 // As a result of this |window| has freshly created layers, meaning the layers
77 // are all empty (nothing has been painted to them) and are sized to 0x0. Soon 77 // are all empty (nothing has been painted to them) and are sized to 0x0. Soon
78 // after this call you need to reset the bounds of the window. Or, you can pass 78 // after this call you need to reset the bounds of the window. Or, you can pass
79 // true as the second argument to let the function do that. 79 // true as the second argument to let the function do that.
80 ASH_EXPORT ui::Layer* RecreateWindowLayers(aura::Window* window, 80 ASH_EXPORT ui::Layer* RecreateWindowLayers(aura::Window* window,
81 bool set_bounds) WARN_UNUSED_RESULT; 81 bool set_bounds) WARN_UNUSED_RESULT;
82 82
83 // Deletes |layer| and all its child layers. 83 // Deletes |layer| and all its child layers.
84 ASH_EXPORT void DeepDeleteLayers(ui::Layer* layer); 84 ASH_EXPORT void DeepDeleteLayers(ui::Layer* layer);
85 85
86 // Returns true if |window|'s position can automatically be managed.
87 ASH_EXPORT bool IsWindowPositionManaged(const aura::Window* window);
88
89 // Change the |window|'s position manageability to |managed|.
90 ASH_EXPORT void SetWindowPositionManaged(aura::Window* window, bool managed);
91
92 // Returns true if the user has changed the |window|'s position or size.
93 ASH_EXPORT bool HasUserChangedWindowPositionOrSize(const aura::Window* window);
94
95 // Marks a |window|'s coordinates to be changed by a user.
96 ASH_EXPORT void SetUserHasChangedWindowPositionOrSize(aura::Window* window,
97 bool changed);
98
86 } // namespace wm 99 } // namespace wm
87 } // namespace ash 100 } // namespace ash
88 101
89 #endif // ASH_WM_WINDOW_UTIL_H_ 102 #endif // ASH_WM_WINDOW_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698