| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 for (View* v = this; v; v = v->parent_) | 230 for (View* v = this; v; v = v->parent_) |
| 231 v->ViewHierarchyChangedImpl(false, details); | 231 v->ViewHierarchyChangedImpl(false, details); |
| 232 | 232 |
| 233 view->PropagateAddNotifications(details); | 233 view->PropagateAddNotifications(details); |
| 234 UpdateTooltip(); | 234 UpdateTooltip(); |
| 235 views::Widget* widget = GetWidget(); | 235 views::Widget* widget = GetWidget(); |
| 236 if (widget) { | 236 if (widget) { |
| 237 RegisterChildrenForVisibleBoundsNotification(view); | 237 RegisterChildrenForVisibleBoundsNotification(view); |
| 238 const ui::NativeTheme* new_theme = widget->GetNativeTheme(); | 238 const ui::NativeTheme* new_theme = widget->GetNativeTheme(); |
| 239 if (new_theme != old_theme) | 239 if (new_theme != old_theme) |
| 240 PropagateNativeThemeChanged(new_theme); | 240 view->PropagateNativeThemeChanged(new_theme); |
| 241 if (view->visible()) | 241 if (view->visible()) |
| 242 view->SchedulePaint(); | 242 view->SchedulePaint(); |
| 243 } | 243 } |
| 244 | 244 |
| 245 if (layout_manager_.get()) | 245 if (layout_manager_.get()) |
| 246 layout_manager_->ViewAdded(this, view); | 246 layout_manager_->ViewAdded(this, view); |
| 247 | 247 |
| 248 ReorderLayers(); | 248 ReorderLayers(); |
| 249 | 249 |
| 250 // Make sure the visibility of the child layers are correct. | 250 // Make sure the visibility of the child layers are correct. |
| (...skipping 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2365 // Message the RootView to do the drag and drop. That way if we're removed | 2365 // Message the RootView to do the drag and drop. That way if we're removed |
| 2366 // the RootView can detect it and avoid calling us back. | 2366 // the RootView can detect it and avoid calling us back. |
| 2367 gfx::Point widget_location(event.location()); | 2367 gfx::Point widget_location(event.location()); |
| 2368 ConvertPointToWidget(this, &widget_location); | 2368 ConvertPointToWidget(this, &widget_location); |
| 2369 widget->RunShellDrag(this, data, widget_location, drag_operations, source); | 2369 widget->RunShellDrag(this, data, widget_location, drag_operations, source); |
| 2370 // WARNING: we may have been deleted. | 2370 // WARNING: we may have been deleted. |
| 2371 return true; | 2371 return true; |
| 2372 } | 2372 } |
| 2373 | 2373 |
| 2374 } // namespace views | 2374 } // namespace views |
| OLD | NEW |