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

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

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698