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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 frame_view_->Layout(); | 127 frame_view_->Layout(); |
128 } | 128 } |
129 | 129 |
130 void NonClientView::SetAccessibleName(const base::string16& name) { | 130 void NonClientView::SetAccessibleName(const base::string16& name) { |
131 accessible_name_ = name; | 131 accessible_name_ = name; |
132 } | 132 } |
133 | 133 |
134 //////////////////////////////////////////////////////////////////////////////// | 134 //////////////////////////////////////////////////////////////////////////////// |
135 // NonClientView, View overrides: | 135 // NonClientView, View overrides: |
136 | 136 |
137 gfx::Size NonClientView::GetPreferredSize() { | 137 gfx::Size NonClientView::GetPreferredSize() const { |
138 // TODO(pkasting): This should probably be made to look similar to | 138 // TODO(pkasting): This should probably be made to look similar to |
139 // GetMinimumSize() below. This will require implementing GetPreferredSize() | 139 // GetMinimumSize() below. This will require implementing GetPreferredSize() |
140 // better in the various frame views. | 140 // better in the various frame views. |
141 gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize()); | 141 gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize()); |
142 return GetWindowBoundsForClientBounds(client_bounds).size(); | 142 return GetWindowBoundsForClientBounds(client_bounds).size(); |
143 } | 143 } |
144 | 144 |
145 gfx::Size NonClientView::GetMinimumSize() { | 145 gfx::Size NonClientView::GetMinimumSize() const { |
146 return frame_view_->GetMinimumSize(); | 146 return frame_view_->GetMinimumSize(); |
147 } | 147 } |
148 | 148 |
149 gfx::Size NonClientView::GetMaximumSize() { | 149 gfx::Size NonClientView::GetMaximumSize() { |
150 return frame_view_->GetMaximumSize(); | 150 return frame_view_->GetMaximumSize(); |
151 } | 151 } |
152 | 152 |
153 void NonClientView::Layout() { | 153 void NonClientView::Layout() { |
154 LayoutFrameView(); | 154 LayoutFrameView(); |
155 | 155 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 322 |
323 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { | 323 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { |
324 // Overridden to do nothing. The NonClientView manually calls Layout on the | 324 // Overridden to do nothing. The NonClientView manually calls Layout on the |
325 // FrameView when it is itself laid out, see comment in NonClientView::Layout. | 325 // FrameView when it is itself laid out, see comment in NonClientView::Layout. |
326 } | 326 } |
327 | 327 |
328 NonClientFrameView::NonClientFrameView() : inactive_rendering_disabled_(false) { | 328 NonClientFrameView::NonClientFrameView() : inactive_rendering_disabled_(false) { |
329 } | 329 } |
330 | 330 |
331 } // namespace views | 331 } // namespace views |
OLD | NEW |