OLD | NEW |
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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Mark the container window so that InstallSnapLayoutManagerToContainers | 70 // Mark the container window so that InstallSnapLayoutManagerToContainers |
71 // installs the SnapToPixelLayoutManager. | 71 // installs the SnapToPixelLayoutManager. |
72 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary( | 72 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary( |
73 aura::Window* container); | 73 aura::Window* container); |
74 | 74 |
75 // Convenience for window->delegate()->GetNonClientComponent(location) that | 75 // Convenience for window->delegate()->GetNonClientComponent(location) that |
76 // returns HTNOWHERE if window->delegate() is null. | 76 // returns HTNOWHERE if window->delegate() is null. |
77 ASH_EXPORT int GetNonClientComponent(aura::Window* window, | 77 ASH_EXPORT int GetNonClientComponent(aura::Window* window, |
78 const gfx::Point& location); | 78 const gfx::Point& location); |
79 | 79 |
| 80 // When set, the child windows should get a slightly larger hit region to make |
| 81 // resizing easier. |
| 82 ASH_EXPORT void SetChildrenUseExtendedHitRegionForWindow(aura::Window* window); |
| 83 ASH_EXPORT bool ShouldUseExtendedHitRegionForWindow(const aura::Window* window); |
| 84 |
80 // Requests the |window| to close and destroy itself. This is intended to | 85 // Requests the |window| to close and destroy itself. This is intended to |
81 // forward to an associated widget. | 86 // forward to an associated widget. |
82 ASH_EXPORT void CloseWidgetForWindow(aura::Window* window); | 87 ASH_EXPORT void CloseWidgetForWindow(aura::Window* window); |
83 | 88 |
84 // Adds or removes a handler to receive events targeted at this window, before | 89 // Adds or removes a handler to receive events targeted at this window, before |
85 // this window handles the events itself; the handler does not receive events | 90 // this window handles the events itself; the handler does not receive events |
86 // from embedded windows. This only supports windows with internal widgets; | 91 // from embedded windows. This only supports windows with internal widgets; |
87 // see ash::GetInternalWidgetForWindow(). Ownership of the handler is not | 92 // see ash::GetInternalWidgetForWindow(). Ownership of the handler is not |
88 // transferred. | 93 // transferred. |
89 // | 94 // |
90 // Also note that the target of these events is always an aura::Window. | 95 // Also note that the target of these events is always an aura::Window. |
91 ASH_EXPORT void AddLimitedPreTargetHandlerForWindow(ui::EventHandler* handler, | 96 ASH_EXPORT void AddLimitedPreTargetHandlerForWindow(ui::EventHandler* handler, |
92 aura::Window* window); | 97 aura::Window* window); |
93 ASH_EXPORT void RemoveLimitedPreTargetHandlerForWindow( | 98 ASH_EXPORT void RemoveLimitedPreTargetHandlerForWindow( |
94 ui::EventHandler* handler, | 99 ui::EventHandler* handler, |
95 aura::Window* window); | 100 aura::Window* window); |
96 | 101 |
97 } // namespace wm | 102 } // namespace wm |
98 } // namespace ash | 103 } // namespace ash |
99 | 104 |
100 #endif // ASH_WM_WINDOW_UTIL_H_ | 105 #endif // ASH_WM_WINDOW_UTIL_H_ |
OLD | NEW |