Index: ui/views/widget/desktop_aura/desktop_root_window_host_win.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc |
index d0c7ee240304f7ad39c9766a45eb15b97e762315..4fc9a84ee27acf3c7728e80c2c4462eee8dbd381 100644 |
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc |
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc |
@@ -79,11 +79,12 @@ aura::Window* DesktopRootWindowHostWin::GetContentWindowForHWND(HWND hwnd) { |
ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) { |
// Use NativeThemeWin for windows shown on the desktop, those not on the |
// desktop come from Ash and get NativeThemeAura. |
- aura::RootWindow* root = window ? window->GetRootWindow() : NULL; |
- if (root) { |
- HWND root_hwnd = root->GetAcceleratedWidget(); |
- if (root_hwnd && |
- DesktopRootWindowHostWin::GetContentWindowForHWND(root_hwnd)) { |
+ aura::WindowEventDispatcher* dispatcher = |
+ window ? window->GetDispatcher() : NULL; |
+ if (dispatcher) { |
+ HWND host_hwnd = dispatcher->GetAcceleratedWidget(); |
+ if (host_hwnd && |
+ DesktopRootWindowHostWin::GetContentWindowForHWND(host_hwnd)) { |
return ui::NativeThemeWin::instance(); |
} |
} |
@@ -107,8 +108,8 @@ void DesktopRootWindowHostWin::Init( |
native_widget_delegate_); |
HWND parent_hwnd = NULL; |
- if (params.parent && params.parent->GetRootWindow()) |
- parent_hwnd = params.parent->GetRootWindow()->GetAcceleratedWidget(); |
+ if (params.parent && params.parent->GetDispatcher()) |
+ parent_hwnd = params.parent->GetDispatcher()->GetAcceleratedWidget(); |
message_handler_->set_remove_standard_frame(params.remove_standard_frame); |