| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 bool EmbedUrl(shell::Connector* connector, | 61 bool EmbedUrl(shell::Connector* connector, |
| 62 WindowTree* tree, | 62 WindowTree* tree, |
| 63 const String& url, | 63 const String& url, |
| 64 Id root_id) { | 64 Id root_id) { |
| 65 bool result = false; | 65 bool result = false; |
| 66 base::RunLoop run_loop; | 66 base::RunLoop run_loop; |
| 67 { | 67 { |
| 68 mojom::WindowTreeClientPtr client; | 68 mojom::WindowTreeClientPtr client; |
| 69 connector->ConnectToInterface(url.get(), &client); | 69 connector->ConnectToInterface(url.get(), &client); |
| 70 tree->Embed(root_id, std::move(client), | 70 const uint32_t embed_flags = 0; |
| 71 tree->Embed(root_id, std::move(client), embed_flags, |
| 71 base::Bind(&EmbedCallbackImpl, &run_loop, &result)); | 72 base::Bind(&EmbedCallbackImpl, &run_loop, &result)); |
| 72 } | 73 } |
| 73 run_loop.Run(); | 74 run_loop.Run(); |
| 74 return result; | 75 return result; |
| 75 } | 76 } |
| 76 | 77 |
| 77 bool Embed(WindowTree* tree, Id root_id, mojom::WindowTreeClientPtr client) { | 78 bool Embed(WindowTree* tree, Id root_id, mojom::WindowTreeClientPtr client) { |
| 78 bool result = false; | 79 bool result = false; |
| 79 base::RunLoop run_loop; | 80 base::RunLoop run_loop; |
| 80 { | 81 { |
| 81 tree->Embed(root_id, std::move(client), | 82 const uint32_t embed_flags = 0; |
| 83 tree->Embed(root_id, std::move(client), embed_flags, |
| 82 base::Bind(&EmbedCallbackImpl, &run_loop, &result)); | 84 base::Bind(&EmbedCallbackImpl, &run_loop, &result)); |
| 83 } | 85 } |
| 84 run_loop.Run(); | 86 run_loop.Run(); |
| 85 return result; | 87 return result; |
| 86 } | 88 } |
| 87 | 89 |
| 88 void GetWindowTree(WindowTree* tree, | 90 void GetWindowTree(WindowTree* tree, |
| 89 Id window_id, | 91 Id window_id, |
| 90 std::vector<TestWindow>* windows) { | 92 std::vector<TestWindow>* windows) { |
| 91 base::RunLoop run_loop; | 93 base::RunLoop run_loop; |
| (...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2031 | 2033 |
| 2032 // TODO(sky): make sure coverage of what was | 2034 // TODO(sky): make sure coverage of what was |
| 2033 // WindowManagerTest.SecondEmbedRoot_InitService and | 2035 // WindowManagerTest.SecondEmbedRoot_InitService and |
| 2034 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 2036 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window |
| 2035 // manager | 2037 // manager |
| 2036 // tests. | 2038 // tests. |
| 2037 | 2039 |
| 2038 } // namespace test | 2040 } // namespace test |
| 2039 } // namespace ws | 2041 } // namespace ws |
| 2040 } // namespace mus | 2042 } // namespace mus |
| OLD | NEW |