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

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: Removed a part of the change which slipped in through a branch switch and eclipse usage Created 8 years, 1 month 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_properties.cc ('k') | ash/wm/window_util.cc » ('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 (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 21 matching lines...) Expand all
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 the active window or one its ancestors is fullscreen. 38 // Returns true if the active window or one its ancestors is fullscreen.
39 ASH_EXPORT bool IsActiveWindowFullscreen(); 39 ASH_EXPORT bool IsActiveWindowFullscreen();
40 40
41 // Returns true if |window| can be maximized. 41 // Returns true if |window| can be maximized.
42 ASH_EXPORT bool CanMaximizeWindow(aura::Window* window); 42 ASH_EXPORT bool CanMaximizeWindow(const aura::Window* window);
43 43
44 // Returns true if |window| is normal or default. 44 // Returns true if |window| is normal or default.
45 ASH_EXPORT bool IsWindowNormal(aura::Window* window); 45 ASH_EXPORT bool IsWindowNormal(const aura::Window* window);
46 46
47 // Returns true if |state| is normal or default. 47 // Returns true if |state| is normal or default.
48 ASH_EXPORT bool IsWindowStateNormal(ui::WindowShowState state); 48 ASH_EXPORT bool IsWindowStateNormal(const ui::WindowShowState state);
49 49
50 // Returns true if |window| is in the maximized state. 50 // Returns true if |window| is in the maximized state.
51 ASH_EXPORT bool IsWindowMaximized(aura::Window* window); 51 ASH_EXPORT bool IsWindowMaximized(const aura::Window* window);
52 52
53 // Returns true if |window| is minimized. 53 // Returns true if |window| is minimized.
54 ASH_EXPORT bool IsWindowMinimized(aura::Window* window); 54 ASH_EXPORT bool IsWindowMinimized(const aura::Window* window);
55 55
56 // Returns true if |window| is in the fullscreen state. 56 // Returns true if |window| is in the fullscreen state.
57 ASH_EXPORT bool IsWindowFullscreen(aura::Window* window); 57 ASH_EXPORT bool IsWindowFullscreen(const aura::Window* window);
58 58
59 // Maximizes |window|, which must not be NULL. 59 // Maximizes |window|, which must not be NULL.
60 ASH_EXPORT void MaximizeWindow(aura::Window* window); 60 ASH_EXPORT void MaximizeWindow(aura::Window* window);
61 61
62 // Minimizes |window|, which must not be NULL. 62 // Minimizes |window|, which must not be NULL.
63 ASH_EXPORT void MinimizeWindow(aura::Window* window); 63 ASH_EXPORT void MinimizeWindow(aura::Window* window);
64 64
65 // Restores |window|, which must not be NULL. 65 // Restores |window|, which must not be NULL.
66 ASH_EXPORT void RestoreWindow(aura::Window* window); 66 ASH_EXPORT void RestoreWindow(aura::Window* window);
67 67
(...skipping 11 matching lines...) Expand all
79 // As a result of this |window| has freshly created layers, meaning the layers 79 // As a result of this |window| has freshly created layers, meaning the layers
80 // are all empty (nothing has been painted to them) and are sized to 0x0. Soon 80 // are all empty (nothing has been painted to them) and are sized to 0x0. Soon
81 // after this call you need to reset the bounds of the window. Or, you can pass 81 // after this call you need to reset the bounds of the window. Or, you can pass
82 // true as the second argument to let the function do that. 82 // true as the second argument to let the function do that.
83 ASH_EXPORT ui::Layer* RecreateWindowLayers(aura::Window* window, 83 ASH_EXPORT ui::Layer* RecreateWindowLayers(aura::Window* window,
84 bool set_bounds) WARN_UNUSED_RESULT; 84 bool set_bounds) WARN_UNUSED_RESULT;
85 85
86 // Deletes |layer| and all its child layers. 86 // Deletes |layer| and all its child layers.
87 ASH_EXPORT void DeepDeleteLayers(ui::Layer* layer); 87 ASH_EXPORT void DeepDeleteLayers(ui::Layer* layer);
88 88
89 // Returns true if |window|'s position can automatically be managed.
90 ASH_EXPORT bool IsWindowPositionManaged(const aura::Window* window);
91
92 // Change the |window|'s position manageability to |managed|.
93 ASH_EXPORT void SetWindowPositionManaged(aura::Window* window, bool managed);
94
95 // Returns true if the user has changed the |window|'s position or size.
96 ASH_EXPORT bool HasUserChangedWindowPositionOrSize(const aura::Window* window);
97
98 // Marks a |window|'s coordinates to be changed by a user.
99 ASH_EXPORT void SetUserHasChangedWindowPositionOrSize(aura::Window* window,
100 bool changed);
101
89 } // namespace wm 102 } // namespace wm
90 } // namespace ash 103 } // namespace ash
91 104
92 #endif // ASH_WM_WINDOW_UTIL_H_ 105 #endif // ASH_WM_WINDOW_UTIL_H_
OLDNEW
« no previous file with comments | « ash/wm/window_properties.cc ('k') | ash/wm/window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698