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_WINDOW_NON_CLIENT_VIEW_H_ | 5 #ifndef UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
6 #define UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ | 6 #define UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
7 | 7 |
8 #include "ui/views/view.h" | 8 #include "ui/views/view.h" |
9 #include "ui/views/view_targeter_delegate.h" | 9 #include "ui/views/view_targeter_delegate.h" |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // This function must ask the ClientView to do a hittest. We don't do this in | 72 // This function must ask the ClientView to do a hittest. We don't do this in |
73 // the parent NonClientView because that makes it more difficult to calculate | 73 // the parent NonClientView because that makes it more difficult to calculate |
74 // hittests for regions that are partially obscured by the ClientView, e.g. | 74 // hittests for regions that are partially obscured by the ClientView, e.g. |
75 // HTSYSMENU. | 75 // HTSYSMENU. |
76 virtual int NonClientHitTest(const gfx::Point& point) = 0; | 76 virtual int NonClientHitTest(const gfx::Point& point) = 0; |
77 virtual void GetWindowMask(const gfx::Size& size, | 77 virtual void GetWindowMask(const gfx::Size& size, |
78 gfx::Path* window_mask) = 0; | 78 gfx::Path* window_mask) = 0; |
79 virtual void ResetWindowControls() = 0; | 79 virtual void ResetWindowControls() = 0; |
80 virtual void UpdateWindowIcon() = 0; | 80 virtual void UpdateWindowIcon() = 0; |
81 virtual void UpdateWindowTitle() = 0; | 81 virtual void UpdateWindowTitle() = 0; |
| 82 virtual void SizeConstraintsChanged() = 0; |
82 | 83 |
83 // View: | 84 // View: |
84 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 85 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
85 virtual const char* GetClassName() const OVERRIDE; | 86 virtual const char* GetClassName() const OVERRIDE; |
86 | 87 |
87 protected: | 88 protected: |
88 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 89 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
89 | 90 |
90 NonClientFrameView(); | 91 NonClientFrameView(); |
91 | 92 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // when the window is maximized, minimized or restored. | 189 // when the window is maximized, minimized or restored. |
189 void ResetWindowControls(); | 190 void ResetWindowControls(); |
190 | 191 |
191 // Tells the NonClientView to invalidate the NonClientFrameView's window icon. | 192 // Tells the NonClientView to invalidate the NonClientFrameView's window icon. |
192 void UpdateWindowIcon(); | 193 void UpdateWindowIcon(); |
193 | 194 |
194 // Tells the NonClientView to invalidate the NonClientFrameView's window | 195 // Tells the NonClientView to invalidate the NonClientFrameView's window |
195 // title. | 196 // title. |
196 void UpdateWindowTitle(); | 197 void UpdateWindowTitle(); |
197 | 198 |
| 199 // Called when the size constraints of the window change. |
| 200 void SizeConstraintsChanged(); |
| 201 |
198 // Get/Set client_view property. | 202 // Get/Set client_view property. |
199 ClientView* client_view() const { return client_view_; } | 203 ClientView* client_view() const { return client_view_; } |
200 void set_client_view(ClientView* client_view) { | 204 void set_client_view(ClientView* client_view) { |
201 client_view_ = client_view; | 205 client_view_ = client_view; |
202 } | 206 } |
203 | 207 |
204 // Layout just the frame view. This is necessary on Windows when non-client | 208 // Layout just the frame view. This is necessary on Windows when non-client |
205 // metrics such as the position of the window controls changes independently | 209 // metrics such as the position of the window controls changes independently |
206 // of a window resize message. | 210 // of a window resize message. |
207 void LayoutFrameView(); | 211 void LayoutFrameView(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 249 |
246 // The accessible name of this view. | 250 // The accessible name of this view. |
247 base::string16 accessible_name_; | 251 base::string16 accessible_name_; |
248 | 252 |
249 DISALLOW_COPY_AND_ASSIGN(NonClientView); | 253 DISALLOW_COPY_AND_ASSIGN(NonClientView); |
250 }; | 254 }; |
251 | 255 |
252 } // namespace views | 256 } // namespace views |
253 | 257 |
254 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ | 258 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
OLD | NEW |