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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. | 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. |
6 | 6 |
7 #include "ui/views/view.h" | 7 #include "ui/views/view.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1242 int View::GetLineScrollIncrement(ScrollView* scroll_view, | 1242 int View::GetLineScrollIncrement(ScrollView* scroll_view, |
1243 bool is_horizontal, bool is_positive) { | 1243 bool is_horizontal, bool is_positive) { |
1244 return 0; | 1244 return 0; |
1245 } | 1245 } |
1246 | 1246 |
1247 //////////////////////////////////////////////////////////////////////////////// | 1247 //////////////////////////////////////////////////////////////////////////////// |
1248 // View, protected: | 1248 // View, protected: |
1249 | 1249 |
1250 // Size and disposition -------------------------------------------------------- | 1250 // Size and disposition -------------------------------------------------------- |
1251 | 1251 |
1252 void View::OnBoundsChanged(const gfx::Rect& previous_bounds) { | 1252 void View::ChildPreferredSizeChanged(View* child) { |
| 1253 if (layout_manager_) |
| 1254 layout_manager_->OnChildPreferredSizeChanged(this, child); |
1253 } | 1255 } |
1254 | 1256 |
1255 void View::PreferredSizeChanged() { | 1257 void View::PreferredSizeChanged() { |
1256 InvalidateLayout(); | 1258 InvalidateLayout(); |
1257 if (parent_) | 1259 if (parent_) |
1258 parent_->ChildPreferredSizeChanged(this); | 1260 parent_->ChildPreferredSizeChanged(this); |
1259 } | 1261 } |
1260 | 1262 |
1261 bool View::NeedsNotificationWhenVisibleBoundsChange() const { | 1263 bool View::NeedsNotificationWhenVisibleBoundsChange() const { |
1262 return false; | 1264 return false; |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2293 ConvertPointToWidget(this, &widget_location); | 2295 ConvertPointToWidget(this, &widget_location); |
2294 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations, | 2296 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations, |
2295 source); | 2297 source); |
2296 return true; | 2298 return true; |
2297 #else | 2299 #else |
2298 return false; | 2300 return false; |
2299 #endif // !defined(OS_MACOSX) | 2301 #endif // !defined(OS_MACOSX) |
2300 } | 2302 } |
2301 | 2303 |
2302 } // namespace views | 2304 } // namespace views |
OLD | NEW |