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: Restore change from bad rebase. 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
« no previous file with comments | « ui/views/linux_ui/native_theme_change_observer.h ('k') | ui/views/views.gyp » ('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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 for (View* v = this; v; v = v->parent_) 238 for (View* v = this; v; v = v->parent_)
239 v->ViewHierarchyChangedImpl(false, details); 239 v->ViewHierarchyChangedImpl(false, details);
240 240
241 view->PropagateAddNotifications(details); 241 view->PropagateAddNotifications(details);
242 UpdateTooltip(); 242 UpdateTooltip();
243 views::Widget* widget = GetWidget(); 243 views::Widget* widget = GetWidget();
244 if (widget) { 244 if (widget) {
245 RegisterChildrenForVisibleBoundsNotification(view); 245 RegisterChildrenForVisibleBoundsNotification(view);
246 const ui::NativeTheme* new_theme = widget->GetNativeTheme(); 246 const ui::NativeTheme* new_theme = widget->GetNativeTheme();
247 if (new_theme != old_theme) 247 if (new_theme != old_theme)
248 PropagateNativeThemeChanged(new_theme); 248 view->PropagateNativeThemeChanged(new_theme);
249 if (view->visible()) 249 if (view->visible())
250 view->SchedulePaint(); 250 view->SchedulePaint();
251 } 251 }
252 252
253 if (layout_manager_.get()) 253 if (layout_manager_.get())
254 layout_manager_->ViewAdded(this, view); 254 layout_manager_->ViewAdded(this, view);
255 255
256 ReorderLayers(); 256 ReorderLayers();
257 257
258 // Make sure the visibility of the child layers are correct. 258 // Make sure the visibility of the child layers are correct.
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 // Message the RootView to do the drag and drop. That way if we're removed 2385 // Message the RootView to do the drag and drop. That way if we're removed
2386 // the RootView can detect it and avoid calling us back. 2386 // the RootView can detect it and avoid calling us back.
2387 gfx::Point widget_location(event.location()); 2387 gfx::Point widget_location(event.location());
2388 ConvertPointToWidget(this, &widget_location); 2388 ConvertPointToWidget(this, &widget_location);
2389 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2389 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2390 // WARNING: we may have been deleted. 2390 // WARNING: we may have been deleted.
2391 return true; 2391 return true;
2392 } 2392 }
2393 2393
2394 } // namespace views 2394 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/linux_ui/native_theme_change_observer.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698