Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(902)

Side by Side Diff: services/ui/ws/window_manager_client_unittest.cc

Issue 2617883002: Add a new BindInterface() method to Connector. (Closed)
Patch Set: . Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/gpu_host.cc ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 278 }
279 std::unique_ptr<EmbedResult> result = std::move(embed_details_->result); 279 std::unique_ptr<EmbedResult> result = std::move(embed_details_->result);
280 embed_details_.reset(); 280 embed_details_.reset();
281 return result; 281 return result;
282 } 282 }
283 283
284 // Establishes a connection to this application and asks for a 284 // Establishes a connection to this application and asks for a
285 // WindowTreeClient. 285 // WindowTreeClient.
286 ui::mojom::WindowTreeClientPtr ConnectAndGetWindowServerClient() { 286 ui::mojom::WindowTreeClientPtr ConnectAndGetWindowServerClient() {
287 ui::mojom::WindowTreeClientPtr client; 287 ui::mojom::WindowTreeClientPtr client;
288 connector()->ConnectToInterface(test_name(), &client); 288 connector()->BindInterface(test_name(), &client);
289 return client; 289 return client;
290 } 290 }
291 291
292 std::unique_ptr<ClientAreaChange> WaitForClientAreaToChange() { 292 std::unique_ptr<ClientAreaChange> WaitForClientAreaToChange() {
293 client_area_change_ = base::MakeUnique<ClientAreaChange>(); 293 client_area_change_ = base::MakeUnique<ClientAreaChange>();
294 // The nested message loop is quit in OnWmSetClientArea(). Client area 294 // The nested message loop is quit in OnWmSetClientArea(). Client area
295 // changes don't route through the window, only the WindowManagerDelegate. 295 // changes don't route through the window, only the WindowManagerDelegate.
296 if (!WindowServerTestBase::DoRunLoopWithTimeout()) { 296 if (!WindowServerTestBase::DoRunLoopWithTimeout()) {
297 client_area_change_.reset(); 297 client_area_change_.reset();
298 return nullptr; 298 return nullptr;
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 ASSERT_EQ(1u, top_level_in_wm->children().size()); 757 ASSERT_EQ(1u, top_level_in_wm->children().size());
758 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0]; 758 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0];
759 ASSERT_EQ(1u, second_client_child_in_wm->children().size()); 759 ASSERT_EQ(1u, second_client_child_in_wm->children().size());
760 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0]; 760 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0];
761 ASSERT_EQ(second_client_child_in_wm, 761 ASSERT_EQ(second_client_child_in_wm,
762 transient_window_client->GetTransientParent(transient_in_wm)); 762 transient_window_client->GetTransientParent(transient_in_wm));
763 } 763 }
764 764
765 } // namespace ws 765 } // namespace ws
766 } // namespace ui 766 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/gpu_host.cc ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698