| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 bool EmbedUrl(shell::Connector* connector, | 63 bool EmbedUrl(shell::Connector* connector, |
| 64 WindowTree* tree, | 64 WindowTree* tree, |
| 65 const String& url, | 65 const String& url, |
| 66 Id root_id) { | 66 Id root_id) { |
| 67 bool result = false; | 67 bool result = false; |
| 68 base::RunLoop run_loop; | 68 base::RunLoop run_loop; |
| 69 { | 69 { |
| 70 mojom::WindowTreeClientPtr client; | 70 mojom::WindowTreeClientPtr client; |
| 71 connector->ConnectToInterface(url.get(), &client); | 71 connector->ConnectToInterface(url.get(), &client); |
| 72 tree->Embed(root_id, std::move(client), | 72 const uint32_t embed_flags = 0; |
| 73 tree->Embed(root_id, std::move(client), embed_flags, |
| 73 base::Bind(&EmbedCallbackImpl, &run_loop, &result)); | 74 base::Bind(&EmbedCallbackImpl, &run_loop, &result)); |
| 74 } | 75 } |
| 75 run_loop.Run(); | 76 run_loop.Run(); |
| 76 return result; | 77 return result; |
| 77 } | 78 } |
| 78 | 79 |
| 79 bool Embed(WindowTree* tree, Id root_id, mojom::WindowTreeClientPtr client) { | 80 bool Embed(WindowTree* tree, Id root_id, mojom::WindowTreeClientPtr client) { |
| 80 bool result = false; | 81 bool result = false; |
| 81 base::RunLoop run_loop; | 82 base::RunLoop run_loop; |
| 82 { | 83 { |
| 83 tree->Embed(root_id, std::move(client), | 84 const uint32_t embed_flags = 0; |
| 85 tree->Embed(root_id, std::move(client), embed_flags, |
| 84 base::Bind(&EmbedCallbackImpl, &run_loop, &result)); | 86 base::Bind(&EmbedCallbackImpl, &run_loop, &result)); |
| 85 } | 87 } |
| 86 run_loop.Run(); | 88 run_loop.Run(); |
| 87 return result; | 89 return result; |
| 88 } | 90 } |
| 89 | 91 |
| 90 void GetWindowTree(WindowTree* tree, | 92 void GetWindowTree(WindowTree* tree, |
| 91 Id window_id, | 93 Id window_id, |
| 92 std::vector<TestWindow>* windows) { | 94 std::vector<TestWindow>* windows) { |
| 93 base::RunLoop run_loop; | 95 base::RunLoop run_loop; |
| (...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 | 2029 |
| 2028 // TODO(sky): make sure coverage of what was | 2030 // TODO(sky): make sure coverage of what was |
| 2029 // WindowManagerTest.SecondEmbedRoot_InitService and | 2031 // WindowManagerTest.SecondEmbedRoot_InitService and |
| 2030 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 2032 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window |
| 2031 // manager | 2033 // manager |
| 2032 // tests. | 2034 // tests. |
| 2033 | 2035 |
| 2034 } // namespace test | 2036 } // namespace test |
| 2035 } // namespace ws | 2037 } // namespace ws |
| 2036 } // namespace mus | 2038 } // namespace mus |
| OLD | NEW |