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

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

Issue 1890713002: Adds WmWindow and converts WindowState to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again 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_util.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 11 matching lines...) Expand all
22 namespace ui { 22 namespace ui {
23 class Event; 23 class Event;
24 } 24 }
25 25
26 namespace ash { 26 namespace ash {
27 // We force at least this many DIPs for any window on the screen. 27 // We force at least this many DIPs for any window on the screen.
28 const int kMinimumOnScreenArea = 25; 28 const int kMinimumOnScreenArea = 25;
29 29
30 namespace wm { 30 namespace wm {
31 31
32 class WmWindow;
33
32 // Utility functions for window activation. 34 // Utility functions for window activation.
33 ASH_EXPORT void ActivateWindow(aura::Window* window); 35 ASH_EXPORT void ActivateWindow(aura::Window* window);
34 ASH_EXPORT void DeactivateWindow(aura::Window* window); 36 ASH_EXPORT void DeactivateWindow(aura::Window* window);
35 ASH_EXPORT bool IsActiveWindow(aura::Window* window); 37 ASH_EXPORT bool IsActiveWindow(aura::Window* window);
36 ASH_EXPORT aura::Window* GetActiveWindow(); 38 ASH_EXPORT aura::Window* GetActiveWindow();
37 ASH_EXPORT bool CanActivateWindow(aura::Window* window); 39 ASH_EXPORT bool CanActivateWindow(aura::Window* window);
38 40
39 // Retrieves the activatable window for |window|. If |window| is activatable, 41 // Retrieves the activatable window for |window|. If |window| is activatable,
40 // this will just return it, otherwise it will climb the parent/transient parent 42 // this will just return it, otherwise it will climb the parent/transient parent
41 // chain looking for a window that is activatable, per the ActivationController. 43 // chain looking for a window that is activatable, per the ActivationController.
42 // If you're looking for a function to get the activatable "top level" window, 44 // If you're looking for a function to get the activatable "top level" window,
43 // this is probably what you're looking for. 45 // this is probably what you're looking for.
44 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); 46 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window);
45 47
46 // TODO(oshima): remove this. 48 // TODO(oshima): remove this.
47 ASH_EXPORT bool IsWindowMinimized(aura::Window* window); 49 ASH_EXPORT bool IsWindowMinimized(aura::Window* window);
48 50
49 // Returns true if |window|'s location can be controlled by the user. 51 // Returns true if |window|'s location can be controlled by the user.
50 ASH_EXPORT bool IsWindowUserPositionable(aura::Window* window); 52 ASH_EXPORT bool IsWindowUserPositionable(aura::Window* window);
51 53
52 // Moves the window to the center of the display. 54 // Moves the window to the center of the display.
53 ASH_EXPORT void CenterWindow(aura::Window* window); 55 ASH_EXPORT void CenterWindow(aura::Window* window);
54 56
57 ASH_EXPORT gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent(
58 wm::WmWindow* window);
59 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent(
60 wm::WmWindow* window);
61
55 // Returns the bounds of a left snapped window with default width in parent 62 // Returns the bounds of a left snapped window with default width in parent
56 // coordinates. 63 // coordinates.
57 ASH_EXPORT gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent( 64 ASH_EXPORT gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent(
58 aura::Window* window); 65 aura::Window* window);
59 66
60 // Returns the bounds of a right snapped window with default width in parent 67 // Returns the bounds of a right snapped window with default width in parent
61 // coordinates. 68 // coordinates.
62 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent( 69 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent(
63 aura::Window* window); 70 aura::Window* window);
64 71
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary( 115 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary(
109 aura::Window* container); 116 aura::Window* container);
110 117
111 // Traverse the |container| tree and installs SnapToPixelLayoutManager. 118 // Traverse the |container| tree and installs SnapToPixelLayoutManager.
112 void InstallSnapLayoutManagerToContainers(aura::Window* container); 119 void InstallSnapLayoutManagerToContainers(aura::Window* container);
113 120
114 } // namespace wm 121 } // namespace wm
115 } // namespace ash 122 } // namespace ash
116 123
117 #endif // ASH_WM_WINDOW_UTIL_H_ 124 #endif // ASH_WM_WINDOW_UTIL_H_
OLDNEW
« no previous file with comments | « ash/wm/window_state_util.cc ('k') | ash/wm/window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698