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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 protected: | 91 protected: |
92 NonClientFrameView(); | 92 NonClientFrameView(); |
93 | 93 |
94 // ViewTargeterDelegate: | 94 // ViewTargeterDelegate: |
95 bool DoesIntersectRect(const View* target, | 95 bool DoesIntersectRect(const View* target, |
96 const gfx::Rect& rect) const override; | 96 const gfx::Rect& rect) const override; |
97 | 97 |
98 // View: | 98 // View: |
99 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | 99 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
| 100 |
| 101 void set_active_state_override(bool* active_state_override) { |
| 102 active_state_override_ = active_state_override; |
| 103 } |
| 104 |
| 105 private: |
| 106 // Used to force ShouldPaintAsActive() to treat the active state a particular |
| 107 // way. This is normally null; when non-null, its value will override the |
| 108 // normal "active" value computed by the function. |
| 109 bool* active_state_override_; |
| 110 |
| 111 DISALLOW_COPY_AND_ASSIGN(NonClientFrameView); |
100 }; | 112 }; |
101 | 113 |
102 //////////////////////////////////////////////////////////////////////////////// | 114 //////////////////////////////////////////////////////////////////////////////// |
103 // NonClientView | 115 // NonClientView |
104 // | 116 // |
105 // The NonClientView is the logical root of all Views contained within a | 117 // 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 | 118 // 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 | 119 // sole child. The NonClientView has two children, the NonClientFrameView which |
108 // is responsible for painting and responding to events from the non-client | 120 // 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 | 121 // 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 | 254 |
243 // The accessible name of this view. | 255 // The accessible name of this view. |
244 base::string16 accessible_name_; | 256 base::string16 accessible_name_; |
245 | 257 |
246 DISALLOW_COPY_AND_ASSIGN(NonClientView); | 258 DISALLOW_COPY_AND_ASSIGN(NonClientView); |
247 }; | 259 }; |
248 | 260 |
249 } // namespace views | 261 } // namespace views |
250 | 262 |
251 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ | 263 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ |
OLD | NEW |