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

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

Issue 2645253002: DesktopAura: Track windows "owned" via the DesktopWindowTreeHost (Closed)
Patch Set: Add context, comment Created 3 years, 11 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_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 5eb0d546515ee37a17bba5c867d3f36b7aa4465a..ed892f88d822986e3dcb706c4234e2221e10f334 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
@@ -481,6 +481,21 @@ bool DesktopWindowTreeHostWin::ShouldUseDesktopNativeCursorManager() const {
return true;
}
+std::vector<DesktopWindowTreeHost*>
+DesktopWindowTreeHostWin::GetOwnedTopLevelHosts() const {
+ std::vector<DesktopWindowTreeHost*> hosts;
+ std::vector<HWND> child_windows = message_handler_->GetOwnedWindows();
+ for (HWND hwnd : child_windows) {
+ if (aura::WindowTreeHost* host = GetForAcceleratedWidget(hwnd)) {
+ if (DesktopWindowTreeHostWin* target =
+ host->window()->GetProperty(kDesktopWindowTreeHostKey)) {
+ hosts.push_back(target);
+ }
+ }
+ }
+ return hosts;
+}
+
////////////////////////////////////////////////////////////////////////////////
// DesktopWindowTreeHostWin, WindowTreeHost implementation:

Powered by Google App Engine
This is Rietveld 408576698