| 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/window/client_view.h" | 9 #include "ui/views/window/client_view.h" |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 // This function must ask the ClientView to do a hittest. We don't do this in | 59 // This function must ask the ClientView to do a hittest. We don't do this in |
| 60 // the parent NonClientView because that makes it more difficult to calculate | 60 // the parent NonClientView because that makes it more difficult to calculate |
| 61 // hittests for regions that are partially obscured by the ClientView, e.g. | 61 // hittests for regions that are partially obscured by the ClientView, e.g. |
| 62 // HTSYSMENU. | 62 // HTSYSMENU. |
| 63 virtual int NonClientHitTest(const gfx::Point& point) = 0; | 63 virtual int NonClientHitTest(const gfx::Point& point) = 0; |
| 64 virtual void GetWindowMask(const gfx::Size& size, | 64 virtual void GetWindowMask(const gfx::Size& size, |
| 65 gfx::Path* window_mask) = 0; | 65 gfx::Path* window_mask) = 0; |
| 66 virtual void ResetWindowControls() = 0; | 66 virtual void ResetWindowControls() = 0; |
| 67 virtual void UpdateWindowIcon() = 0; | 67 virtual void UpdateWindowIcon() = 0; |
| 68 virtual void UpdateWindowTitle() = 0; |
| 68 | 69 |
| 69 // Overridden from View: | 70 // Overridden from View: |
| 70 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; | 71 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; |
| 71 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 72 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 72 virtual std::string GetClassName() const OVERRIDE; | 73 virtual std::string GetClassName() const OVERRIDE; |
| 73 | 74 |
| 74 protected: | 75 protected: |
| 75 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 76 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
| 76 | 77 |
| 77 NonClientFrameView() : paint_as_active_(false) {} | 78 NonClientFrameView() : paint_as_active_(false) {} |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // Tells the window controls as rendered by the NonClientView to reset | 178 // Tells the window controls as rendered by the NonClientView to reset |
| 178 // themselves to a normal state. This happens in situations where the | 179 // themselves to a normal state. This happens in situations where the |
| 179 // containing window does not receive a normal sequences of messages that | 180 // containing window does not receive a normal sequences of messages that |
| 180 // would lead to the controls returning to this normal state naturally, e.g. | 181 // would lead to the controls returning to this normal state naturally, e.g. |
| 181 // when the window is maximized, minimized or restored. | 182 // when the window is maximized, minimized or restored. |
| 182 void ResetWindowControls(); | 183 void ResetWindowControls(); |
| 183 | 184 |
| 184 // Tells the NonClientView to invalidate the NonClientFrameView's window icon. | 185 // Tells the NonClientView to invalidate the NonClientFrameView's window icon. |
| 185 void UpdateWindowIcon(); | 186 void UpdateWindowIcon(); |
| 186 | 187 |
| 188 // Tells the NonClientView to invalidate the NonClientFrameView's window |
| 189 // title. |
| 190 void UpdateWindowTitle(); |
| 191 |
| 187 // Get/Set client_view property. | 192 // Get/Set client_view property. |
| 188 ClientView* client_view() const { return client_view_; } | 193 ClientView* client_view() const { return client_view_; } |
| 189 void set_client_view(ClientView* client_view) { | 194 void set_client_view(ClientView* client_view) { |
| 190 client_view_ = client_view; | 195 client_view_ = client_view; |
| 191 } | 196 } |
| 192 | 197 |
| 193 // Layout just the frame view. This is necessary on Windows when non-client | 198 // Layout just the frame view. This is necessary on Windows when non-client |
| 194 // metrics such as the position of the window controls changes independently | 199 // metrics such as the position of the window controls changes independently |
| 195 // of a window resize message. | 200 // of a window resize message. |
| 196 void LayoutFrameView(); | 201 void LayoutFrameView(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 227 | 232 |
| 228 // The accessible name of this view. | 233 // The accessible name of this view. |
| 229 string16 accessible_name_; | 234 string16 accessible_name_; |
| 230 | 235 |
| 231 DISALLOW_COPY_AND_ASSIGN(NonClientView); | 236 DISALLOW_COPY_AND_ASSIGN(NonClientView); |
| 232 }; | 237 }; |
| 233 | 238 |
| 234 } // namespace views | 239 } // namespace views |
| 235 | 240 |
| 236 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ | 241 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
| OLD | NEW |