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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc

Issue 2483683002: Try to get rid of all direct references to particular native themes. (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/widget/desktop_aura/desktop_window_tree_host_win.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 574a2e99d821d8210e6a17e5116dba18040b57f2..4df399879c3dd91fa6224a10fc5a9bce73a0b717 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -107,17 +107,7 @@ aura::Window* DesktopWindowTreeHostWin::GetContentWindowForHWND(HWND hwnd) {
// static
ui::NativeTheme* DesktopWindowTreeHost::GetNativeTheme(aura::Window* window) {
- // Use NativeThemeWin for windows shown on the desktop, those not on the
- // desktop come from Ash and get NativeThemeAura.
- aura::WindowTreeHost* host = window ? window->GetHost() : NULL;
- if (host) {
- HWND host_hwnd = host->GetAcceleratedWidget();
- if (host_hwnd &&
- DesktopWindowTreeHostWin::GetContentWindowForHWND(host_hwnd)) {
- return ui::NativeThemeWin::instance();
- }
- }
- return ui::NativeThemeAura::instance();
+ return ui::NativeTheme::GetInstanceForNativeUi();
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698