Index: ui/aura/mus/window_tree_client.cc |
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc |
index f6c28e6be901ab23bc1274c27272c6ab68f2b39c..8d860d5eb71bae3b199b0506634341ea3a6c9cec 100644 |
--- a/ui/aura/mus/window_tree_client.cc |
+++ b/ui/aura/mus/window_tree_client.cc |
@@ -880,11 +880,9 @@ void WindowTreeClient::OnEmbed(ClientSpecificId client_id, |
window_tree_host->InitHost(); |
ConfigureWindowDataFromServer(window_tree_host, *root_data); |
- // TODO(tonikitoo): Fix the WindowTreeClientDelegate::OnEmbed API. |
- // In external window mode, this needs not to pass the ownership of the |
- // WindowTreeHostMus instance to the delegate_. A raw pointer should |
- // surface. |
- delegate_->OnEmbed(nullptr); |
+ // Pass a raw pointer to WindowTreeHostMus, which helps delegate to identify |
+ // which WindowTreeHostMus to use in case if there are many of them. |
+ delegate_->OnEmbedRootReady(window_tree_host); |
return; |
} |