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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "ui/aura/aura_export.h" | 10 #include "ui/aura/aura_export.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // Returns the window's minimum size, or size 0,0 if there is no limit. | 37 // Returns the window's minimum size, or size 0,0 if there is no limit. |
38 virtual gfx::Size GetMinimumSize() const = 0; | 38 virtual gfx::Size GetMinimumSize() const = 0; |
39 | 39 |
40 // Returns the window's maximum size, or size 0,0 if there is no limit. | 40 // Returns the window's maximum size, or size 0,0 if there is no limit. |
41 virtual gfx::Size GetMaximumSize() const = 0; | 41 virtual gfx::Size GetMaximumSize() const = 0; |
42 | 42 |
43 // Called when the Window's position and/or size changes. | 43 // Called when the Window's position and/or size changes. |
44 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 44 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
45 const gfx::Rect& new_bounds) = 0; | 45 const gfx::Rect& new_bounds) = 0; |
46 | 46 |
| 47 // Returns the native cursor for the specified point, in window coordinates, |
| 48 // or NULL for the default cursor. |
| 49 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) = 0; |
| 50 |
47 // Returns the non-client component (see hit_test.h) containing |point|, in | 51 // Returns the non-client component (see hit_test.h) containing |point|, in |
48 // window coordinates. | 52 // window coordinates. |
49 virtual int GetNonClientComponent(const gfx::Point& point) const = 0; | 53 virtual int GetNonClientComponent(const gfx::Point& point) const = 0; |
50 | 54 |
51 // Returns true if event handling should descend into |child|. |location| is | 55 // Returns true if event handling should descend into |child|. |location| is |
52 // in terms of the Window. | 56 // in terms of the Window. |
53 virtual bool ShouldDescendIntoChildForEventHandling( | 57 virtual bool ShouldDescendIntoChildForEventHandling( |
54 Window* child, | 58 Window* child, |
55 const gfx::Point& location) = 0; | 59 const gfx::Point& location) = 0; |
56 | 60 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // SetTextureMailbox / SetDelegatedFrame was called). | 107 // SetTextureMailbox / SetDelegatedFrame was called). |
104 virtual void DidRecreateLayer(ui::Layer* old_layer, ui::Layer* new_layer) = 0; | 108 virtual void DidRecreateLayer(ui::Layer* old_layer, ui::Layer* new_layer) = 0; |
105 | 109 |
106 protected: | 110 protected: |
107 virtual ~WindowDelegate() {} | 111 virtual ~WindowDelegate() {} |
108 }; | 112 }; |
109 | 113 |
110 } // namespace aura | 114 } // namespace aura |
111 | 115 |
112 #endif // UI_AURA_WINDOW_DELEGATE_H_ | 116 #endif // UI_AURA_WINDOW_DELEGATE_H_ |
OLD | NEW |