| 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 28 matching lines...) Expand all Loading... |
| 39 // Returns the window's minimum size, or size 0,0 if there is no limit. | 39 // Returns the window's minimum size, or size 0,0 if there is no limit. |
| 40 virtual gfx::Size GetMinimumSize() const = 0; | 40 virtual gfx::Size GetMinimumSize() const = 0; |
| 41 | 41 |
| 42 // Returns the window's maximum size, or size 0,0 if there is no limit. | 42 // Returns the window's maximum size, or size 0,0 if there is no limit. |
| 43 virtual gfx::Size GetMaximumSize() const = 0; | 43 virtual gfx::Size GetMaximumSize() const = 0; |
| 44 | 44 |
| 45 // Called when the Window's position and/or size changes. | 45 // Called when the Window's position and/or size changes. |
| 46 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 46 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 47 const gfx::Rect& new_bounds) = 0; | 47 const gfx::Rect& new_bounds) = 0; |
| 48 | 48 |
| 49 // Returns the focused text input client within this window. | |
| 50 // This function does not look at child windows. | |
| 51 virtual ui::TextInputClient* GetFocusedTextInputClient() = 0; | |
| 52 | |
| 53 // Returns the native cursor for the specified point, in window coordinates, | 49 // Returns the native cursor for the specified point, in window coordinates, |
| 54 // or NULL for the default cursor. | 50 // or NULL for the default cursor. |
| 55 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) = 0; | 51 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) = 0; |
| 56 | 52 |
| 57 // Returns the non-client component (see hit_test.h) containing |point|, in | 53 // Returns the non-client component (see hit_test.h) containing |point|, in |
| 58 // window coordinates. | 54 // window coordinates. |
| 59 virtual int GetNonClientComponent(const gfx::Point& point) const = 0; | 55 virtual int GetNonClientComponent(const gfx::Point& point) const = 0; |
| 60 | 56 |
| 61 // Returns true if event handling should descend into |child|. |location| is | 57 // Returns true if event handling should descend into |child|. |location| is |
| 62 // in terms of the Window. | 58 // in terms of the Window. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // above returns true. | 102 // above returns true. |
| 107 virtual void GetHitTestMask(gfx::Path* mask) const = 0; | 103 virtual void GetHitTestMask(gfx::Path* mask) const = 0; |
| 108 | 104 |
| 109 protected: | 105 protected: |
| 110 ~WindowDelegate() override {} | 106 ~WindowDelegate() override {} |
| 111 }; | 107 }; |
| 112 | 108 |
| 113 } // namespace aura | 109 } // namespace aura |
| 114 | 110 |
| 115 #endif // UI_AURA_WINDOW_DELEGATE_H_ | 111 #endif // UI_AURA_WINDOW_DELEGATE_H_ |
| OLD | NEW |