| 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 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 void View::PropagateNativeThemeChanged(const ui::NativeTheme* theme) { | 2129 void View::PropagateNativeThemeChanged(const ui::NativeTheme* theme) { |
| 2130 if (native_theme_ && native_theme_ != theme) | 2130 if (native_theme_ && native_theme_ != theme) |
| 2131 return; | 2131 return; |
| 2132 | 2132 |
| 2133 { | 2133 { |
| 2134 internal::ScopedChildrenLock lock(this); | 2134 internal::ScopedChildrenLock lock(this); |
| 2135 for (auto* child : children_) | 2135 for (auto* child : children_) |
| 2136 child->PropagateNativeThemeChanged(theme); | 2136 child->PropagateNativeThemeChanged(theme); |
| 2137 } | 2137 } |
| 2138 OnNativeThemeChanged(theme); | 2138 OnNativeThemeChanged(theme); |
| 2139 for (ViewObserver& observer : observers_) | |
| 2140 observer.OnViewNativeThemeChanged(this); | |
| 2141 } | 2139 } |
| 2142 | 2140 |
| 2143 // Size and disposition -------------------------------------------------------- | 2141 // Size and disposition -------------------------------------------------------- |
| 2144 | 2142 |
| 2145 void View::PropagateVisibilityNotifications(View* start, bool is_visible) { | 2143 void View::PropagateVisibilityNotifications(View* start, bool is_visible) { |
| 2146 { | 2144 { |
| 2147 internal::ScopedChildrenLock lock(this); | 2145 internal::ScopedChildrenLock lock(this); |
| 2148 for (auto* child : children_) | 2146 for (auto* child : children_) |
| 2149 child->PropagateVisibilityNotifications(start, is_visible); | 2147 child->PropagateVisibilityNotifications(start, is_visible); |
| 2150 } | 2148 } |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2664 // Message the RootView to do the drag and drop. That way if we're removed | 2662 // Message the RootView to do the drag and drop. That way if we're removed |
| 2665 // the RootView can detect it and avoid calling us back. | 2663 // the RootView can detect it and avoid calling us back. |
| 2666 gfx::Point widget_location(event.location()); | 2664 gfx::Point widget_location(event.location()); |
| 2667 ConvertPointToWidget(this, &widget_location); | 2665 ConvertPointToWidget(this, &widget_location); |
| 2668 widget->RunShellDrag(this, data, widget_location, drag_operations, source); | 2666 widget->RunShellDrag(this, data, widget_location, drag_operations, source); |
| 2669 // WARNING: we may have been deleted. | 2667 // WARNING: we may have been deleted. |
| 2670 return true; | 2668 return true; |
| 2671 } | 2669 } |
| 2672 | 2670 |
| 2673 } // namespace views | 2671 } // namespace views |
| OLD | NEW |