| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 VIEWS_WINDOW_NON_CLIENT_VIEW_H_ | 5 #ifndef VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
| 6 #define VIEWS_WINDOW_NON_CLIENT_VIEW_H_ | 6 #define VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "views/view.h" | 10 #include "views/view.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 SchedulePaint(); | 41 SchedulePaint(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 // Returns the bounds (in this View's parent's coordinates) that the client | 44 // Returns the bounds (in this View's parent's coordinates) that the client |
| 45 // view should be laid out within. | 45 // view should be laid out within. |
| 46 virtual gfx::Rect GetBoundsForClientView() const = 0; | 46 virtual gfx::Rect GetBoundsForClientView() const = 0; |
| 47 | 47 |
| 48 // Returns true if this FrameView should always use the custom frame, | 48 // Returns true if this FrameView should always use the custom frame, |
| 49 // regardless of the system settings. An example is the Constrained Window, | 49 // regardless of the system settings. An example is the Constrained Window, |
| 50 // which is a child window and must always provide its own frame. | 50 // which is a child window and must always provide its own frame. |
| 51 virtual bool AlwaysUseCustomFrame() const { return false; } | 51 virtual bool AlwaysUseCustomFrame() const; |
| 52 | 52 |
| 53 // Like AlwaysUseCustomFrame, returns true if this FrameView should always use | 53 // Like AlwaysUseCustomFrame, returns true if this FrameView should always use |
| 54 // the native frame, regardless of theme settings. An example is popup/app | 54 // the native frame, regardless of theme settings. An example is popup/app |
| 55 // windows, which we do not ever want to show themed. | 55 // windows, which we do not ever want to show themed. |
| 56 virtual bool AlwaysUseNativeFrame() const { return false; } | 56 virtual bool AlwaysUseNativeFrame() const; |
| 57 | 57 |
| 58 virtual gfx::Rect GetWindowBoundsForClientBounds( | 58 virtual gfx::Rect GetWindowBoundsForClientBounds( |
| 59 const gfx::Rect& client_bounds) const = 0; | 59 const gfx::Rect& client_bounds) const = 0; |
| 60 | 60 |
| 61 // This function must ask the ClientView to do a hittest. We don't do this in | 61 // This function must ask the ClientView to do a hittest. We don't do this in |
| 62 // the parent NonClientView because that makes it more difficult to calculate | 62 // the parent NonClientView because that makes it more difficult to calculate |
| 63 // hittests for regions that are partially obscured by the ClientView, e.g. | 63 // hittests for regions that are partially obscured by the ClientView, e.g. |
| 64 // HTSYSMENU. | 64 // HTSYSMENU. |
| 65 virtual int NonClientHitTest(const gfx::Point& point) = 0; | 65 virtual int NonClientHitTest(const gfx::Point& point) = 0; |
| 66 virtual void GetWindowMask(const gfx::Size& size, | 66 virtual void GetWindowMask(const gfx::Size& size, |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // This object is not owned by the view hierarchy because it can be replaced | 229 // This object is not owned by the view hierarchy because it can be replaced |
| 230 // dynamically as the system settings change. | 230 // dynamically as the system settings change. |
| 231 scoped_ptr<NonClientFrameView> frame_view_; | 231 scoped_ptr<NonClientFrameView> frame_view_; |
| 232 | 232 |
| 233 DISALLOW_COPY_AND_ASSIGN(NonClientView); | 233 DISALLOW_COPY_AND_ASSIGN(NonClientView); |
| 234 }; | 234 }; |
| 235 | 235 |
| 236 } // namespace views | 236 } // namespace views |
| 237 | 237 |
| 238 #endif // #ifndef VIEWS_WINDOW_NON_CLIENT_VIEW_H_ | 238 #endif // #ifndef VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
| OLD | NEW |