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 | |
51 // Returns the non-client component (see hit_test.h) containing |point|, in | 47 // Returns the non-client component (see hit_test.h) containing |point|, in |
52 // window coordinates. | 48 // window coordinates. |
53 virtual int GetNonClientComponent(const gfx::Point& point) const = 0; | 49 virtual int GetNonClientComponent(const gfx::Point& point) const = 0; |
54 | 50 |
55 // Returns true if event handling should descend into |child|. |location| is | 51 // Returns true if event handling should descend into |child|. |location| is |
56 // in terms of the Window. | 52 // in terms of the Window. |
57 virtual bool ShouldDescendIntoChildForEventHandling( | 53 virtual bool ShouldDescendIntoChildForEventHandling( |
58 Window* child, | 54 Window* child, |
59 const gfx::Point& location) = 0; | 55 const gfx::Point& location) = 0; |
60 | 56 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // SetTextureMailbox / SetDelegatedFrame was called). | 103 // SetTextureMailbox / SetDelegatedFrame was called). |
108 virtual void DidRecreateLayer(ui::Layer* old_layer, ui::Layer* new_layer) = 0; | 104 virtual void DidRecreateLayer(ui::Layer* old_layer, ui::Layer* new_layer) = 0; |
109 | 105 |
110 protected: | 106 protected: |
111 virtual ~WindowDelegate() {} | 107 virtual ~WindowDelegate() {} |
112 }; | 108 }; |
113 | 109 |
114 } // namespace aura | 110 } // namespace aura |
115 | 111 |
116 #endif // UI_AURA_WINDOW_DELEGATE_H_ | 112 #endif // UI_AURA_WINDOW_DELEGATE_H_ |
OLD | NEW |