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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
10 #include "ui/base/events.h" | 10 #include "ui/base/events.h" |
11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class Canvas; | 14 class Canvas; |
15 class Path; | |
15 class Point; | 16 class Point; |
16 class Rect; | 17 class Rect; |
17 class Size; | 18 class Size; |
18 } | 19 } |
19 | 20 |
20 namespace aura { | 21 namespace aura { |
21 | 22 |
22 class Event; | 23 class Event; |
23 class GestureEvent; | 24 class GestureEvent; |
24 class KeyEvent; | 25 class KeyEvent; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 // deleted and the window has been removed from its parent. | 78 // deleted and the window has been removed from its parent. |
78 // The delegate can use this as an opportunity to delete itself if necessary. | 79 // The delegate can use this as an opportunity to delete itself if necessary. |
79 virtual void OnWindowDestroyed() = 0; | 80 virtual void OnWindowDestroyed() = 0; |
80 | 81 |
81 // Called when the visibility of a Window changes. See description in | 82 // Called when the visibility of a Window changes. See description in |
82 // WindowObserver::OnWindowDestroyed() for details. | 83 // WindowObserver::OnWindowDestroyed() for details. |
83 // TODO: this should be renamed to OnWindowTargetVisibilityChanged() to | 84 // TODO: this should be renamed to OnWindowTargetVisibilityChanged() to |
84 // match when it's sent. | 85 // match when it's sent. |
85 virtual void OnWindowVisibilityChanged(bool visible) = 0; | 86 virtual void OnWindowVisibilityChanged(bool visible) = 0; |
86 | 87 |
88 // Called from Window::HitTest to check if the window has a custom hit test | |
89 // mask. It works similar to the vies counterparts. That is, if the function | |
Ben Goodger (Google)
2012/06/15 22:57:26
views
xiyuan
2012/06/15 23:07:41
Done.
| |
90 // returns true, GetHitTestMask below will be called to get the mask. | |
91 // Otherwise, Window will hit-test against its bounds. | |
92 virtual bool HasHitTestMask() const = 0; | |
93 | |
94 // Called from Window::HitTest to retrieve hit test mask when HasHitTestMask | |
95 // above returns true. | |
96 virtual void GetHitTestMask(gfx::Path* mask) const = 0; | |
97 | |
87 protected: | 98 protected: |
88 virtual ~WindowDelegate() {} | 99 virtual ~WindowDelegate() {} |
89 }; | 100 }; |
90 | 101 |
91 } // namespace aura | 102 } // namespace aura |
92 | 103 |
93 #endif // UI_AURA_WINDOW_DELEGATE_H_ | 104 #endif // UI_AURA_WINDOW_DELEGATE_H_ |
OLD | NEW |