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

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

Issue 239093007: Update Windows UI on system color changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 6 years, 8 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 | Annotate | Revision Log
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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698