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

Unified Diff: ui/views/view.cc

Issue 2484043003: Revert of Clean up some NativeTheme code. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index b6cd9d0e97f9345128f754a62f0b80e15fa2430f..51d246f0a3fdd6fe91bdc5a351f06909c558287b 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -870,7 +870,14 @@
if (widget)
return widget->GetNativeTheme();
- return ui::NativeTheme::GetInstanceForNativeUi();
+#if defined(OS_WIN)
+ // On Windows, ui::NativeTheme::GetInstanceForWeb() returns NativeThemeWinAura
+ // because that's what the renderer wants, but Views should default to
+ // NativeThemeWin. TODO(estade): clean this up, see http://crbug.com/558029
+ return ui::NativeThemeWin::instance();
+#else
+ return ui::NativeTheme::GetInstanceForWeb();
+#endif
}
// RTL painting ----------------------------------------------------------------
« ui/native_theme/native_theme_aura.cc ('K') | « ui/native_theme/native_theme_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698