| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <map> | 5 #include <map> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 static_cast<int32_t>(ui::mojom::WindowType::WINDOW)); | 99 static_cast<int32_t>(ui::mojom::WindowType::WINDOW)); |
| 100 aura::WindowTreeHostMus window_tree_host_mus(&client, &properties); | 100 aura::WindowTreeHostMus window_tree_host_mus(&client, &properties); |
| 101 window_tree_host_mus.InitHost(); | 101 window_tree_host_mus.InitHost(); |
| 102 aura::Window* child_window = new aura::Window(nullptr); | 102 aura::Window* child_window = new aura::Window(nullptr); |
| 103 child_window->Init(ui::LAYER_NOT_DRAWN); | 103 child_window->Init(ui::LAYER_NOT_DRAWN); |
| 104 window_tree_host_mus.window()->AddChild(child_window); | 104 window_tree_host_mus.window()->AddChild(child_window); |
| 105 | 105 |
| 106 // Create another WindowTreeClient by way of embedding in | 106 // Create another WindowTreeClient by way of embedding in |
| 107 // |child_window|. This blocks until it succeeds. | 107 // |child_window|. This blocks until it succeeds. |
| 108 ui::mojom::WindowTreeClientPtr tree_client; | 108 ui::mojom::WindowTreeClientPtr tree_client; |
| 109 auto tree_client_request = GetProxy(&tree_client); | 109 auto tree_client_request = MakeRequest(&tree_client); |
| 110 client.Embed(child_window, std::move(tree_client), 0u, base::Bind(&OnEmbed)); | 110 client.Embed(child_window, std::move(tree_client), 0u, base::Bind(&OnEmbed)); |
| 111 aura::WindowTreeClient child_client(connector(), &window_tree_delegate, | 111 aura::WindowTreeClient child_client(connector(), &window_tree_delegate, |
| 112 nullptr, std::move(tree_client_request)); | 112 nullptr, std::move(tree_client_request)); |
| 113 window_tree_delegate.WaitForEmbed(); | 113 window_tree_delegate.WaitForEmbed(); |
| 114 ASSERT_TRUE(!child_client.GetRoots().empty()); | 114 ASSERT_TRUE(!child_client.GetRoots().empty()); |
| 115 window_tree_delegate.DestroyWindowTreeHost(); | 115 window_tree_delegate.DestroyWindowTreeHost(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace mus | 118 } // namespace mus |
| 119 } // namespace ash | 119 } // namespace ash |
| OLD | NEW |