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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
10 #include "ui/views/view_targeter_delegate.h" | 10 #include "ui/views/view_targeter_delegate.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 int resize_corner_width, | 58 int resize_corner_width, |
59 bool can_resize); | 59 bool can_resize); |
60 | 60 |
61 // Returns the bounds (in this View's parent's coordinates) that the client | 61 // Returns the bounds (in this View's parent's coordinates) that the client |
62 // view should be laid out within. | 62 // view should be laid out within. |
63 virtual gfx::Rect GetBoundsForClientView() const = 0; | 63 virtual gfx::Rect GetBoundsForClientView() const = 0; |
64 | 64 |
65 virtual gfx::Rect GetWindowBoundsForClientBounds( | 65 virtual gfx::Rect GetWindowBoundsForClientBounds( |
66 const gfx::Rect& client_bounds) const = 0; | 66 const gfx::Rect& client_bounds) const = 0; |
67 | 67 |
68 virtual bool GetClientMask(const gfx::Size& size, | |
tapted
2016/03/22 07:38:04
I think this is kindof a nice abstraction (it shou
Evan Stade
2016/03/22 17:59:58
That approach is fine with me, but it requires Bub
| |
69 gfx::Path* mask) const; | |
70 | |
68 // This function must ask the ClientView to do a hittest. We don't do this in | 71 // This function must ask the ClientView to do a hittest. We don't do this in |
69 // the parent NonClientView because that makes it more difficult to calculate | 72 // the parent NonClientView because that makes it more difficult to calculate |
70 // hittests for regions that are partially obscured by the ClientView, e.g. | 73 // hittests for regions that are partially obscured by the ClientView, e.g. |
71 // HTSYSMENU. | 74 // HTSYSMENU. |
72 // Return value is one of the windows HT constants (see ui/base/hit_test.h). | 75 // Return value is one of the windows HT constants (see ui/base/hit_test.h). |
73 virtual int NonClientHitTest(const gfx::Point& point) = 0; | 76 virtual int NonClientHitTest(const gfx::Point& point) = 0; |
74 | 77 |
75 // Used to make the hosting widget shaped (non-rectangular). For a | 78 // Used to make the hosting widget shaped (non-rectangular). For a |
76 // rectangular window do nothing. For a shaped window update |window_mask| | 79 // rectangular window do nothing. For a shaped window update |window_mask| |
77 // accordingly. |size| is the size of the widget. | 80 // accordingly. |size| is the size of the widget. |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 | 260 |
258 // The accessible name of this view. | 261 // The accessible name of this view. |
259 base::string16 accessible_name_; | 262 base::string16 accessible_name_; |
260 | 263 |
261 DISALLOW_COPY_AND_ASSIGN(NonClientView); | 264 DISALLOW_COPY_AND_ASSIGN(NonClientView); |
262 }; | 265 }; |
263 | 266 |
264 } // namespace views | 267 } // namespace views |
265 | 268 |
266 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ | 269 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
OLD | NEW |