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 UI_AURA_WINDOW_DELEGATE_H_ | 5 #ifndef UI_AURA_WINDOW_DELEGATE_H_ |
6 #define UI_AURA_WINDOW_DELEGATE_H_ | 6 #define UI_AURA_WINDOW_DELEGATE_H_ |
7 | 7 |
8 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
9 #include "ui/base/events.h" | 9 #include "ui/base/events.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 // children have been destroyed and the window has been removed from its | 77 // children have been destroyed and the window has been removed from its |
78 // parent. | 78 // parent. |
79 virtual void OnWindowDestroying() = 0; | 79 virtual void OnWindowDestroying() = 0; |
80 | 80 |
81 // Called when the Window has been destroyed (i.e. from its destructor). This | 81 // Called when the Window has been destroyed (i.e. from its destructor). This |
82 // is called after OnWindowDestroying and after the children have been | 82 // is called after OnWindowDestroying and after the children have been |
83 // deleted and the window has been removed from its parent. | 83 // deleted and the window has been removed from its parent. |
84 // The delegate can use this as an opportunity to delete itself if necessary. | 84 // The delegate can use this as an opportunity to delete itself if necessary. |
85 virtual void OnWindowDestroyed() = 0; | 85 virtual void OnWindowDestroyed() = 0; |
86 | 86 |
87 // Called when the visibility of a Window changes. See description in | 87 // Called when the visibility of a Window changes. See description in |
sky
2012/07/24 16:29:40
visibility -> TargetVisiblity()
sky
2012/07/24 16:29:40
Replace the second sentence with |visible| corresp
| |
88 // WindowObserver::OnWindowDestroyed() for details. | 88 // WindowObserver::OnWindowDestroyed() for details. |
89 // TODO: this should be renamed to OnWindowTargetVisibilityChanged() to | 89 virtual void OnWindowTargetVisibilityChanged(bool visible) = 0; |
90 // match when it's sent. | |
91 virtual void OnWindowVisibilityChanged(bool visible) = 0; | |
92 | 90 |
93 // Called from Window::HitTest to check if the window has a custom hit test | 91 // Called from Window::HitTest to check if the window has a custom hit test |
94 // mask. It works similar to the views counterparts. That is, if the function | 92 // mask. It works similar to the views counterparts. That is, if the function |
95 // returns true, GetHitTestMask below will be called to get the mask. | 93 // returns true, GetHitTestMask below will be called to get the mask. |
96 // Otherwise, Window will hit-test against its bounds. | 94 // Otherwise, Window will hit-test against its bounds. |
97 virtual bool HasHitTestMask() const = 0; | 95 virtual bool HasHitTestMask() const = 0; |
98 | 96 |
99 // Called from Window::HitTest to retrieve hit test mask when HasHitTestMask | 97 // Called from Window::HitTest to retrieve hit test mask when HasHitTestMask |
100 // above returns true. | 98 // above returns true. |
101 virtual void GetHitTestMask(gfx::Path* mask) const = 0; | 99 virtual void GetHitTestMask(gfx::Path* mask) const = 0; |
102 | 100 |
103 protected: | 101 protected: |
104 virtual ~WindowDelegate() {} | 102 virtual ~WindowDelegate() {} |
105 }; | 103 }; |
106 | 104 |
107 } // namespace aura | 105 } // namespace aura |
108 | 106 |
109 #endif // UI_AURA_WINDOW_DELEGATE_H_ | 107 #endif // UI_AURA_WINDOW_DELEGATE_H_ |
OLD | NEW |