| 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 "components/mus/ws/window_tree.h" | 5 #include "components/mus/ws/window_tree.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 ServerWindow* embed_window = wm_tree()->GetWindowByClientId(embed_window_id); | 191 ServerWindow* embed_window = wm_tree()->GetWindowByClientId(embed_window_id); |
| 192 ASSERT_TRUE(embed_window); | 192 ASSERT_TRUE(embed_window); |
| 193 EXPECT_TRUE(wm_tree()->SetWindowVisibility(embed_window_id, true)); | 193 EXPECT_TRUE(wm_tree()->SetWindowVisibility(embed_window_id, true)); |
| 194 ASSERT_TRUE(FirstRoot(wm_tree())); | 194 ASSERT_TRUE(FirstRoot(wm_tree())); |
| 195 const ClientWindowId wm_root_id = FirstRootId(wm_tree()); | 195 const ClientWindowId wm_root_id = FirstRootId(wm_tree()); |
| 196 EXPECT_TRUE(wm_tree()->AddWindow(wm_root_id, embed_window_id)); | 196 EXPECT_TRUE(wm_tree()->AddWindow(wm_root_id, embed_window_id)); |
| 197 display()->root_window()->SetBounds(gfx::Rect(0, 0, 100, 100)); | 197 display()->root_window()->SetBounds(gfx::Rect(0, 0, 100, 100)); |
| 198 mojom::WindowTreeClientPtr client; | 198 mojom::WindowTreeClientPtr client; |
| 199 mojom::WindowTreeClientRequest client_request = GetProxy(&client); | 199 mojom::WindowTreeClientRequest client_request = GetProxy(&client); |
| 200 wm_client()->Bind(std::move(client_request)); | 200 wm_client()->Bind(std::move(client_request)); |
| 201 wm_tree()->Embed(embed_window_id, std::move(client)); | 201 const uint32_t embed_flags = 0; |
| 202 wm_tree()->Embed(embed_window_id, std::move(client), embed_flags); |
| 202 WindowTree* tree1 = window_server()->GetTreeWithRoot(embed_window); | 203 WindowTree* tree1 = window_server()->GetTreeWithRoot(embed_window); |
| 203 ASSERT_TRUE(tree1 != nullptr); | 204 ASSERT_TRUE(tree1 != nullptr); |
| 204 ASSERT_NE(tree1, wm_tree()); | 205 ASSERT_NE(tree1, wm_tree()); |
| 205 | 206 |
| 206 embed_window->SetBounds(gfx::Rect(0, 0, 50, 50)); | 207 embed_window->SetBounds(gfx::Rect(0, 0, 50, 50)); |
| 207 | 208 |
| 208 const ClientWindowId child1_id(BuildClientWindowId(tree1, 1)); | 209 const ClientWindowId child1_id(BuildClientWindowId(tree1, 1)); |
| 209 EXPECT_TRUE(tree1->NewWindow(child1_id, ServerWindow::Properties())); | 210 EXPECT_TRUE(tree1->NewWindow(child1_id, ServerWindow::Properties())); |
| 210 EXPECT_TRUE(tree1->AddWindow(ClientWindowIdForWindow(tree1, embed_window), | 211 EXPECT_TRUE(tree1->AddWindow(ClientWindowIdForWindow(tree1, embed_window), |
| 211 child1_id)); | 212 child1_id)); |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 ASSERT_NE(new_opacity, unknown_window.opacity()); | 996 ASSERT_NE(new_opacity, unknown_window.opacity()); |
| 996 | 997 |
| 997 EXPECT_FALSE(tree->SetWindowOpacity( | 998 EXPECT_FALSE(tree->SetWindowOpacity( |
| 998 ClientWindowId(WindowIdToTransportId(window_id)), new_opacity)); | 999 ClientWindowId(WindowIdToTransportId(window_id)), new_opacity)); |
| 999 EXPECT_NE(new_opacity, unknown_window.opacity()); | 1000 EXPECT_NE(new_opacity, unknown_window.opacity()); |
| 1000 } | 1001 } |
| 1001 | 1002 |
| 1002 } // namespace test | 1003 } // namespace test |
| 1003 } // namespace ws | 1004 } // namespace ws |
| 1004 } // namespace mus | 1005 } // namespace mus |
| OLD | NEW |