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

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

Issue 2835233005: Revert of Introduce a type of View background that stays in sync with its host (Closed)
Patch Set: 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);
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
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
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