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_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ui/events/event_constants.h" | 10 #include "ui/events/event_constants.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Returns the smallest size the window can be resized to by the user. | 82 // Returns the smallest size the window can be resized to by the user. |
83 virtual gfx::Size GetMinimumSize() const = 0; | 83 virtual gfx::Size GetMinimumSize() const = 0; |
84 | 84 |
85 // Returns the largest size the window can be resized to by the user. | 85 // Returns the largest size the window can be resized to by the user. |
86 virtual gfx::Size GetMaximumSize() const = 0; | 86 virtual gfx::Size GetMaximumSize() const = 0; |
87 | 87 |
88 // Called when the NativeWidget changed position. | 88 // Called when the NativeWidget changed position. |
89 virtual void OnNativeWidgetMove() = 0; | 89 virtual void OnNativeWidgetMove() = 0; |
90 | 90 |
91 // Called when the NativeWidget changed size to |new_size|. | 91 // Called when the NativeWidget changed size to |new_size|. |
| 92 // This may happen at the same time as OnNativeWidgetWindowShowStateChanged, |
| 93 // e.g. maximize. |
92 virtual void OnNativeWidgetSizeChanged(const gfx::Size& new_size) = 0; | 94 virtual void OnNativeWidgetSizeChanged(const gfx::Size& new_size) = 0; |
93 | 95 |
| 96 // Called when the NativeWidget changes its window state. |
| 97 // This may happen at the same time as OnNativeWidgetSizeChanged, e.g. |
| 98 // maximize. |
| 99 virtual void OnNativeWidgetWindowShowStateChanged() = 0; |
| 100 |
94 // Called when the user begins/ends to change the bounds of the window. | 101 // Called when the user begins/ends to change the bounds of the window. |
95 virtual void OnNativeWidgetBeginUserBoundsChange() = 0; | 102 virtual void OnNativeWidgetBeginUserBoundsChange() = 0; |
96 virtual void OnNativeWidgetEndUserBoundsChange() = 0; | 103 virtual void OnNativeWidgetEndUserBoundsChange() = 0; |
97 | 104 |
98 // Returns true if the delegate has a FocusManager. | 105 // Returns true if the delegate has a FocusManager. |
99 virtual bool HasFocusManager() const = 0; | 106 virtual bool HasFocusManager() const = 0; |
100 | 107 |
101 // Paints the widget using acceleration. If the widget is not using | 108 // Paints the widget using acceleration. If the widget is not using |
102 // accelerated painting this returns false and does nothing. | 109 // accelerated painting this returns false and does nothing. |
103 virtual bool OnNativeWidgetPaintAccelerated( | 110 virtual bool OnNativeWidgetPaintAccelerated( |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // later. Returns true if the initial focus has been set or the window should | 153 // later. Returns true if the initial focus has been set or the window should |
147 // not set the initial focus, or false if the caller should set the initial | 154 // not set the initial focus, or false if the caller should set the initial |
148 // focus (if any). | 155 // focus (if any). |
149 virtual bool SetInitialFocus(ui::WindowShowState show_state) = 0; | 156 virtual bool SetInitialFocus(ui::WindowShowState show_state) = 0; |
150 }; | 157 }; |
151 | 158 |
152 } // namespace internal | 159 } // namespace internal |
153 } // namespace views | 160 } // namespace views |
154 | 161 |
155 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 162 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
OLD | NEW |