| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "views/window/non_client_view.h" | 5 #include "views/window/non_client_view.h" |
| 6 | 6 |
| 7 #include "ui/base/accessibility/accessible_view_state.h" | 7 #include "ui/base/accessibility/accessible_view_state.h" |
| 8 #include "views/widget/root_view.h" | 8 #include "views/widget/root_view.h" |
| 9 #include "views/widget/widget.h" | 9 #include "views/widget/widget.h" |
| 10 #include "views/window/client_view.h" | 10 #include "views/window/client_view.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 if (frame_view_->HitTest(point_in_child_coords)) | 180 if (frame_view_->HitTest(point_in_child_coords)) |
| 181 return frame_view_->GetEventHandlerForPoint(point_in_child_coords); | 181 return frame_view_->GetEventHandlerForPoint(point_in_child_coords); |
| 182 | 182 |
| 183 return View::GetEventHandlerForPoint(point); | 183 return View::GetEventHandlerForPoint(point); |
| 184 } | 184 } |
| 185 | 185 |
| 186 //////////////////////////////////////////////////////////////////////////////// | 186 //////////////////////////////////////////////////////////////////////////////// |
| 187 // NonClientFrameView, public: | 187 // NonClientFrameView, public: |
| 188 | 188 |
| 189 void NonClientFrameView::SetInactiveRenderingDisabled(bool disable) { | 189 void NonClientFrameView::SetInactiveRenderingDisabled(bool disable) { |
| 190 if (paint_as_active_ == disable) | 190 // See comment in Widget::SetInactiveRenderingDisabled as to why we don't |
| 191 return; | 191 // conditionally invoke ShouldPaintAsActiveChanged. |
| 192 | |
| 193 paint_as_active_ = disable; | 192 paint_as_active_ = disable; |
| 194 ShouldPaintAsActiveChanged(); | 193 ShouldPaintAsActiveChanged(); |
| 195 } | 194 } |
| 196 | 195 |
| 197 //////////////////////////////////////////////////////////////////////////////// | 196 //////////////////////////////////////////////////////////////////////////////// |
| 198 // NonClientFrameView, View overrides: | 197 // NonClientFrameView, View overrides: |
| 199 | 198 |
| 200 bool NonClientFrameView::HitTest(const gfx::Point& l) const { | 199 bool NonClientFrameView::HitTest(const gfx::Point& l) const { |
| 201 // For the default case, we assume the non-client frame view never overlaps | 200 // For the default case, we assume the non-client frame view never overlaps |
| 202 // the client view. | 201 // the client view. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 std::string NonClientFrameView::GetClassName() const { | 270 std::string NonClientFrameView::GetClassName() const { |
| 272 return kViewClassName; | 271 return kViewClassName; |
| 273 } | 272 } |
| 274 | 273 |
| 275 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { | 274 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { |
| 276 // Overridden to do nothing. The NonClientView manually calls Layout on the | 275 // Overridden to do nothing. The NonClientView manually calls Layout on the |
| 277 // FrameView when it is itself laid out, see comment in NonClientView::Layout. | 276 // FrameView when it is itself laid out, see comment in NonClientView::Layout. |
| 278 } | 277 } |
| 279 | 278 |
| 280 } // namespace views | 279 } // namespace views |
| OLD | NEW |