| 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 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace aura { | 31 namespace aura { |
| 32 | 32 |
| 33 // Delegate interface for aura::Window. | 33 // Delegate interface for aura::Window. |
| 34 class AURA_EXPORT WindowDelegate : public ui::EventHandler { | 34 class AURA_EXPORT WindowDelegate : public ui::EventHandler { |
| 35 public: | 35 public: |
| 36 // Returns the window's minimum size, or size 0,0 if there is no limit. | 36 // Returns the window's minimum size, or size 0,0 if there is no limit. |
| 37 virtual gfx::Size GetMinimumSize() const = 0; | 37 virtual gfx::Size GetMinimumSize() const = 0; |
| 38 | 38 |
| 39 // Returns the window's maximum size, or size 0,0 if there is no limit. |
| 40 virtual gfx::Size GetMaximumSize() const = 0; |
| 41 |
| 39 // Called when the Window's position and/or size changes. | 42 // Called when the Window's position and/or size changes. |
| 40 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 43 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 41 const gfx::Rect& new_bounds) = 0; | 44 const gfx::Rect& new_bounds) = 0; |
| 42 | 45 |
| 43 // Sent to the Window's delegate when the Window gains or loses focus. | 46 // Sent to the Window's delegate when the Window gains or loses focus. |
| 44 virtual void OnFocus(aura::Window* old_focused_window) = 0; | 47 virtual void OnFocus(aura::Window* old_focused_window) = 0; |
| 45 virtual void OnBlur() = 0; | 48 virtual void OnBlur() = 0; |
| 46 | 49 |
| 47 // Returns the native cursor for the specified point, in window coordinates, | 50 // Returns the native cursor for the specified point, in window coordinates, |
| 48 // or NULL for the default cursor. | 51 // or NULL for the default cursor. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 protected: | 106 protected: |
| 104 virtual ~WindowDelegate() {} | 107 virtual ~WindowDelegate() {} |
| 105 | 108 |
| 106 // Overridden from ui::EventHandler: | 109 // Overridden from ui::EventHandler: |
| 107 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 110 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; |
| 108 }; | 111 }; |
| 109 | 112 |
| 110 } // namespace aura | 113 } // namespace aura |
| 111 | 114 |
| 112 #endif // UI_AURA_WINDOW_DELEGATE_H_ | 115 #endif // UI_AURA_WINDOW_DELEGATE_H_ |
| OLD | NEW |