| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // accordingly. |size| is the size of the widget. | 77 // accordingly. |size| is the size of the widget. |
| 78 virtual void GetWindowMask(const gfx::Size& size, | 78 virtual void GetWindowMask(const gfx::Size& size, |
| 79 gfx::Path* window_mask) = 0; | 79 gfx::Path* window_mask) = 0; |
| 80 virtual void ResetWindowControls() = 0; | 80 virtual void ResetWindowControls() = 0; |
| 81 virtual void UpdateWindowIcon() = 0; | 81 virtual void UpdateWindowIcon() = 0; |
| 82 virtual void UpdateWindowTitle() = 0; | 82 virtual void UpdateWindowTitle() = 0; |
| 83 | 83 |
| 84 // Whether the widget can be resized or maximized has changed. | 84 // Whether the widget can be resized or maximized has changed. |
| 85 virtual void SizeConstraintsChanged() = 0; | 85 virtual void SizeConstraintsChanged() = 0; |
| 86 | 86 |
| 87 // The widget's activation state has changed to |active|. |
| 88 virtual void ActivationChanged(bool active); |
| 89 |
| 87 // View: | 90 // View: |
| 88 void GetAccessibleState(ui::AXViewState* state) override; | 91 void GetAccessibleState(ui::AXViewState* state) override; |
| 89 const char* GetClassName() const override; | 92 const char* GetClassName() const override; |
| 90 | 93 |
| 91 protected: | 94 protected: |
| 92 NonClientFrameView(); | 95 NonClientFrameView(); |
| 93 | 96 |
| 94 // ViewTargeterDelegate: | 97 // ViewTargeterDelegate: |
| 95 bool DoesIntersectRect(const View* target, | 98 bool DoesIntersectRect(const View* target, |
| 96 const gfx::Rect& rect) const override; | 99 const gfx::Rect& rect) const override; |
| 97 | 100 |
| 98 // View: | 101 // View: |
| 99 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | 102 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
| 103 |
| 104 void set_active_state_override(bool* active_state_override) { |
| 105 active_state_override_ = active_state_override; |
| 106 } |
| 107 |
| 108 private: |
| 109 // Used to force ShouldPaintAsActive() to treat the active state a particular |
| 110 // way. This is normally null; when non-null, its value will override the |
| 111 // normal "active" value computed by the function. |
| 112 bool* active_state_override_; |
| 113 |
| 114 DISALLOW_COPY_AND_ASSIGN(NonClientFrameView); |
| 100 }; | 115 }; |
| 101 | 116 |
| 102 //////////////////////////////////////////////////////////////////////////////// | 117 //////////////////////////////////////////////////////////////////////////////// |
| 103 // NonClientView | 118 // NonClientView |
| 104 // | 119 // |
| 105 // The NonClientView is the logical root of all Views contained within a | 120 // The NonClientView is the logical root of all Views contained within a |
| 106 // Window, except for the RootView which is its parent and of which it is the | 121 // Window, except for the RootView which is its parent and of which it is the |
| 107 // sole child. The NonClientView has two children, the NonClientFrameView which | 122 // sole child. The NonClientView has two children, the NonClientFrameView which |
| 108 // is responsible for painting and responding to events from the non-client | 123 // is responsible for painting and responding to events from the non-client |
| 109 // portions of the window, and the ClientView, which is responsible for the | 124 // portions of the window, and the ClientView, which is responsible for the |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 257 |
| 243 // The accessible name of this view. | 258 // The accessible name of this view. |
| 244 base::string16 accessible_name_; | 259 base::string16 accessible_name_; |
| 245 | 260 |
| 246 DISALLOW_COPY_AND_ASSIGN(NonClientView); | 261 DISALLOW_COPY_AND_ASSIGN(NonClientView); |
| 247 }; | 262 }; |
| 248 | 263 |
| 249 } // namespace views | 264 } // namespace views |
| 250 | 265 |
| 251 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ | 266 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
| OLD | NEW |