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

Side by Side Diff: components/mus/public/cpp/tests/window_server_test_base.cc

Issue 1681813002: Rename Connection::AddService/ConnectToService to Connection::AddInterface/GetInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_binder
Patch Set: . Created 4 years, 10 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 | « components/mus/mus_app.cc ('k') | components/mus/ws/window_tree_apptest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/public/cpp/tests/window_server_test_base.h" 5 #include "components/mus/public/cpp/tests/window_server_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 ASSERT_TRUE(DoRunLoopWithTimeout()); // RunLoop should be quit by OnEmbed(). 70 ASSERT_TRUE(DoRunLoopWithTimeout()); // RunLoop should be quit by OnEmbed().
71 std::swap(window_manager_, most_recent_connection_); 71 std::swap(window_manager_, most_recent_connection_);
72 } 72 }
73 73
74 mojo::ShellClient* WindowServerTestBase::GetShellClient() { 74 mojo::ShellClient* WindowServerTestBase::GetShellClient() {
75 return this; 75 return this;
76 } 76 }
77 77
78 bool WindowServerTestBase::AcceptConnection(mojo::Connection* connection) { 78 bool WindowServerTestBase::AcceptConnection(mojo::Connection* connection) {
79 connection->AddService<mojom::WindowTreeClient>(this); 79 connection->AddInterface<mojom::WindowTreeClient>(this);
80 return true; 80 return true;
81 } 81 }
82 82
83 void WindowServerTestBase::OnEmbed(Window* root) { 83 void WindowServerTestBase::OnEmbed(Window* root) {
84 most_recent_connection_ = root->connection(); 84 most_recent_connection_ = root->connection();
85 EXPECT_TRUE(QuitRunLoop()); 85 EXPECT_TRUE(QuitRunLoop());
86 ASSERT_TRUE(window_manager_client_); 86 ASSERT_TRUE(window_manager_client_);
87 window_manager_client_->AddActivationParent(root); 87 window_manager_client_->AddActivationParent(root);
88 } 88 }
89 89
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 void WindowServerTestBase::Create( 125 void WindowServerTestBase::Create(
126 mojo::Connection* connection, 126 mojo::Connection* connection,
127 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { 127 mojo::InterfaceRequest<mojom::WindowTreeClient> request) {
128 WindowTreeConnection::Create( 128 WindowTreeConnection::Create(
129 this, std::move(request), 129 this, std::move(request),
130 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); 130 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED);
131 } 131 }
132 132
133 } // namespace mus 133 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/mus_app.cc ('k') | components/mus/ws/window_tree_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698