OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/ws/window_manager_state.h" | 5 #include "services/ui/ws/window_manager_state.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 return window_event_targeting_helper_.last_binding()->tree(); | 72 return window_event_targeting_helper_.last_binding()->tree(); |
73 } | 73 } |
74 WindowManagerState* window_manager_state() { return window_manager_state_; } | 74 WindowManagerState* window_manager_state() { return window_manager_state_; } |
75 | 75 |
76 void EmbedAt(WindowTree* tree, | 76 void EmbedAt(WindowTree* tree, |
77 const ClientWindowId& embed_window_id, | 77 const ClientWindowId& embed_window_id, |
78 uint32_t embed_flags, | 78 uint32_t embed_flags, |
79 WindowTree** embed_tree, | 79 WindowTree** embed_tree, |
80 TestWindowTreeClient** embed_client_proxy) { | 80 TestWindowTreeClient** embed_client_proxy) { |
81 mojom::WindowTreeClientPtr embed_client; | 81 mojom::WindowTreeClientPtr embed_client; |
82 mojom::WindowTreeClientRequest client_request = GetProxy(&embed_client); | 82 mojom::WindowTreeClientRequest client_request = MakeRequest(&embed_client); |
83 ASSERT_TRUE( | 83 ASSERT_TRUE( |
84 tree->Embed(embed_window_id, std::move(embed_client), embed_flags)); | 84 tree->Embed(embed_window_id, std::move(embed_client), embed_flags)); |
85 TestWindowTreeClient* client = | 85 TestWindowTreeClient* client = |
86 window_event_targeting_helper_.last_window_tree_client(); | 86 window_event_targeting_helper_.last_window_tree_client(); |
87 ASSERT_EQ(1u, client->tracker()->changes()->size()); | 87 ASSERT_EQ(1u, client->tracker()->changes()->size()); |
88 EXPECT_EQ(CHANGE_TYPE_EMBED, (*client->tracker()->changes())[0].type); | 88 EXPECT_EQ(CHANGE_TYPE_EMBED, (*client->tracker()->changes())[0].type); |
89 client->tracker()->changes()->clear(); | 89 client->tracker()->changes()->clear(); |
90 *embed_client_proxy = client; | 90 *embed_client_proxy = client; |
91 *embed_tree = window_event_targeting_helper_.last_binding()->tree(); | 91 *embed_tree = window_event_targeting_helper_.last_binding()->tree(); |
92 } | 92 } |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 ASSERT_EQ(1u, tree->roots().size()); | 563 ASSERT_EQ(1u, tree->roots().size()); |
564 ClientWindowId root_client_id; | 564 ClientWindowId root_client_id; |
565 ASSERT_TRUE(tree->IsWindowKnown(*(tree->roots().begin()), &root_client_id)); | 565 ASSERT_TRUE(tree->IsWindowKnown(*(tree->roots().begin()), &root_client_id)); |
566 EXPECT_TRUE(tree->DeleteWindow(root_client_id)); | 566 EXPECT_TRUE(tree->DeleteWindow(root_client_id)); |
567 window_server->DestroyTree(tree); | 567 window_server->DestroyTree(tree); |
568 } | 568 } |
569 | 569 |
570 } // namespace test | 570 } // namespace test |
571 } // namespace ws | 571 } // namespace ws |
572 } // namespace ui | 572 } // namespace ui |
OLD | NEW |