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

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

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 void WindowServerTestBase::SetUp() { 65 void WindowServerTestBase::SetUp() {
66 WindowServerShellTestBase::SetUp(); 66 WindowServerShellTestBase::SetUp();
67 67
68 CreateWindowTreeHost(connector(), this, &host_, this); 68 CreateWindowTreeHost(connector(), this, &host_, this);
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 bool WindowServerTestBase::AcceptConnection(mojo::Connection* connection) { 74 bool WindowServerTestBase::AcceptConnection(shell::Connection* connection) {
75 connection->AddInterface<mojom::WindowTreeClient>(this); 75 connection->AddInterface<mojom::WindowTreeClient>(this);
76 return true; 76 return true;
77 } 77 }
78 78
79 void WindowServerTestBase::OnEmbed(Window* root) { 79 void WindowServerTestBase::OnEmbed(Window* root) {
80 most_recent_connection_ = root->connection(); 80 most_recent_connection_ = root->connection();
81 EXPECT_TRUE(QuitRunLoop()); 81 EXPECT_TRUE(QuitRunLoop());
82 ASSERT_TRUE(window_manager_client_); 82 ASSERT_TRUE(window_manager_client_);
83 window_manager_client_->AddActivationParent(root); 83 window_manager_client_->AddActivationParent(root);
84 } 84 }
(...skipping 27 matching lines...) Expand all
112 ? window_manager_delegate_->OnWmCreateTopLevelWindow(properties) 112 ? window_manager_delegate_->OnWmCreateTopLevelWindow(properties)
113 : nullptr; 113 : nullptr;
114 } 114 }
115 115
116 void WindowServerTestBase::OnAccelerator(uint32_t id, const ui::Event& event) { 116 void WindowServerTestBase::OnAccelerator(uint32_t id, const ui::Event& event) {
117 if (window_manager_delegate_) 117 if (window_manager_delegate_)
118 window_manager_delegate_->OnAccelerator(id, event); 118 window_manager_delegate_->OnAccelerator(id, event);
119 } 119 }
120 120
121 void WindowServerTestBase::Create( 121 void WindowServerTestBase::Create(
122 mojo::Connection* connection, 122 shell::Connection* connection,
123 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { 123 mojo::InterfaceRequest<mojom::WindowTreeClient> request) {
124 WindowTreeConnection::Create( 124 WindowTreeConnection::Create(
125 this, std::move(request), 125 this, std::move(request),
126 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); 126 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED);
127 } 127 }
128 128
129 } // namespace mus 129 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/window_server_test_base.h ('k') | components/mus/public/cpp/window_tree_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698