| 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 #include "ui/views/window/non_client_view.h" | 5 #include "ui/views/window/non_client_view.h" |
| 6 | 6 |
| 7 #include "ui/accessibility/ax_view_state.h" | 7 #include "ui/accessibility/ax_view_state.h" |
| 8 #include "ui/base/hit_test.h" | 8 #include "ui/base/hit_test.h" |
| 9 #include "ui/gfx/rect_conversions.h" | 9 #include "ui/gfx/rect_conversions.h" |
| 10 #include "ui/views/rect_based_targeting_utils.h" | 10 #include "ui/views/rect_based_targeting_utils.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 void NonClientView::UpdateWindowIcon() { | 110 void NonClientView::UpdateWindowIcon() { |
| 111 frame_view_->UpdateWindowIcon(); | 111 frame_view_->UpdateWindowIcon(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void NonClientView::UpdateWindowTitle() { | 114 void NonClientView::UpdateWindowTitle() { |
| 115 frame_view_->UpdateWindowTitle(); | 115 frame_view_->UpdateWindowTitle(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void NonClientView::SizeConstraintsChanged() { |
| 119 frame_view_->SizeConstraintsChanged(); |
| 120 } |
| 121 |
| 118 void NonClientView::LayoutFrameView() { | 122 void NonClientView::LayoutFrameView() { |
| 119 // First layout the NonClientFrameView, which determines the size of the | 123 // First layout the NonClientFrameView, which determines the size of the |
| 120 // ClientView... | 124 // ClientView... |
| 121 frame_view_->SetBounds(0, 0, width(), height()); | 125 frame_view_->SetBounds(0, 0, width(), height()); |
| 122 | 126 |
| 123 // We need to manually call Layout here because layout for the frame view can | 127 // We need to manually call Layout here because layout for the frame view can |
| 124 // change independently of the bounds changing - e.g. after the initial | 128 // change independently of the bounds changing - e.g. after the initial |
| 125 // display of the window the metrics of the native window controls can change, | 129 // display of the window the metrics of the native window controls can change, |
| 126 // which does not change the bounds of the window but requires a re-layout to | 130 // which does not change the bounds of the window but requires a re-layout to |
| 127 // trigger a repaint. We override OnBoundsChanged() for the NonClientFrameView | 131 // trigger a repaint. We override OnBoundsChanged() for the NonClientFrameView |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 bool NonClientFrameView::DoesIntersectRect(const View* target, | 334 bool NonClientFrameView::DoesIntersectRect(const View* target, |
| 331 const gfx::Rect& rect) const { | 335 const gfx::Rect& rect) const { |
| 332 CHECK_EQ(target, this); | 336 CHECK_EQ(target, this); |
| 333 | 337 |
| 334 // For the default case, we assume the non-client frame view never overlaps | 338 // For the default case, we assume the non-client frame view never overlaps |
| 335 // the client view. | 339 // the client view. |
| 336 return !GetWidget()->client_view()->bounds().Intersects(rect); | 340 return !GetWidget()->client_view()->bounds().Intersects(rect); |
| 337 } | 341 } |
| 338 | 342 |
| 339 } // namespace views | 343 } // namespace views |
| OLD | NEW |