Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: ui/views/view.cc

Issue 2838273002: Reland 097f9cde453ea57eb4aa037f44add782391c5eb9 (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/bubble/tray_bubble_view.cc ('k') | ui/views/view_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
2139 } 2141 }
2140 2142
2141 // Size and disposition -------------------------------------------------------- 2143 // Size and disposition --------------------------------------------------------
2142 2144
2143 void View::PropagateVisibilityNotifications(View* start, bool is_visible) { 2145 void View::PropagateVisibilityNotifications(View* start, bool is_visible) {
2144 { 2146 {
2145 internal::ScopedChildrenLock lock(this); 2147 internal::ScopedChildrenLock lock(this);
2146 for (auto* child : children_) 2148 for (auto* child : children_)
2147 child->PropagateVisibilityNotifications(start, is_visible); 2149 child->PropagateVisibilityNotifications(start, is_visible);
2148 } 2150 }
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 // Message the RootView to do the drag and drop. That way if we're removed 2664 // Message the RootView to do the drag and drop. That way if we're removed
2663 // the RootView can detect it and avoid calling us back. 2665 // the RootView can detect it and avoid calling us back.
2664 gfx::Point widget_location(event.location()); 2666 gfx::Point widget_location(event.location());
2665 ConvertPointToWidget(this, &widget_location); 2667 ConvertPointToWidget(this, &widget_location);
2666 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2668 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2667 // WARNING: we may have been deleted. 2669 // WARNING: we may have been deleted.
2668 return true; 2670 return true;
2669 } 2671 }
2670 2672
2671 } // namespace views 2673 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/tray_bubble_view.cc ('k') | ui/views/view_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698