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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 // Establishes a connection to this application and asks for a | 297 // Establishes a connection to this application and asks for a |
298 // WindowTreeClient. | 298 // WindowTreeClient. |
299 ui::mojom::WindowTreeClientPtr ConnectAndGetWindowServerClient() { | 299 ui::mojom::WindowTreeClientPtr ConnectAndGetWindowServerClient() { |
300 ui::mojom::WindowTreeClientPtr client; | 300 ui::mojom::WindowTreeClientPtr client; |
301 connector()->BindInterface(test_name(), &client); | 301 connector()->BindInterface(test_name(), &client); |
302 return client; | 302 return client; |
303 } | 303 } |
304 | 304 |
305 std::unique_ptr<ClientAreaChange> WaitForClientAreaToChange() { | 305 std::unique_ptr<ClientAreaChange> WaitForClientAreaToChange() { |
306 client_area_change_ = base::MakeUnique<ClientAreaChange>(); | 306 client_area_change_ = base::MakeUnique<ClientAreaChange>(); |
307 // The nested message loop is quit in OnWmSetClientArea(). Client area | 307 // The nested run loop is quit in OnWmSetClientArea(). Client area |
308 // changes don't route through the window, only the WindowManagerDelegate. | 308 // changes don't route through the window, only the WindowManagerDelegate. |
309 if (!WindowServerTestBase::DoRunLoopWithTimeout()) { | 309 if (!WindowServerTestBase::DoRunLoopWithTimeout()) { |
310 client_area_change_.reset(); | 310 client_area_change_.reset(); |
311 return nullptr; | 311 return nullptr; |
312 } | 312 } |
313 return std::move(client_area_change_); | 313 return std::move(client_area_change_); |
314 } | 314 } |
315 | 315 |
316 // WindowServerTestBase: | 316 // WindowServerTestBase: |
317 void OnEmbed( | 317 void OnEmbed( |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 ASSERT_EQ(1u, top_level_in_wm->children().size()); | 780 ASSERT_EQ(1u, top_level_in_wm->children().size()); |
781 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0]; | 781 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0]; |
782 ASSERT_EQ(1u, second_client_child_in_wm->children().size()); | 782 ASSERT_EQ(1u, second_client_child_in_wm->children().size()); |
783 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0]; | 783 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0]; |
784 ASSERT_EQ(second_client_child_in_wm, | 784 ASSERT_EQ(second_client_child_in_wm, |
785 transient_window_client->GetTransientParent(transient_in_wm)); | 785 transient_window_client->GetTransientParent(transient_in_wm)); |
786 } | 786 } |
787 | 787 |
788 } // namespace ws | 788 } // namespace ws |
789 } // namespace ui | 789 } // namespace ui |
OLD | NEW |