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 b42c5588f690932ca73ff3b5cbcfebe98703c4da..eb91b1643ca7acfb51f5a3b901d52e4f5f7f5a44 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 |
@@ -96,6 +96,10 @@ DesktopWindowTreeHostWin::~DesktopWindowTreeHostWin() { |
// static |
aura::Window* DesktopWindowTreeHostWin::GetContentWindowForHWND(HWND hwnd) { |
+ // All HWND's we create should have WindowTreeHost instances associated with |
sky
2016/01/13 21:56:08
remove comment (at least last sentence, first two
ananta
2016/01/13 22:16:32
Done.
|
+ // them. There are exceptions like the content layer creating HWND's which |
+ // are not associated with WindowTreeHost instances. In such cases we should |
+ // try and find the WindowTreeHost associated with the parent. |
aura::WindowTreeHost* host = |
aura::WindowTreeHost::GetForAcceleratedWidget(hwnd); |
return host ? host->window()->GetProperty(kContentWindowForRootWindow) : NULL; |