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

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

Issue 1459463004: mus: Allow the WM to specify the windows that can have active children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 5 years 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 bool WindowServerTestBase::ConfigureIncomingConnection( 81 bool WindowServerTestBase::ConfigureIncomingConnection(
82 mojo::ApplicationConnection* connection) { 82 mojo::ApplicationConnection* connection) {
83 connection->AddService<mojom::WindowTreeClient>(this); 83 connection->AddService<mojom::WindowTreeClient>(this);
84 return true; 84 return true;
85 } 85 }
86 86
87 void WindowServerTestBase::OnEmbed(Window* root) { 87 void WindowServerTestBase::OnEmbed(Window* root) {
88 most_recent_connection_ = root->connection(); 88 most_recent_connection_ = root->connection();
89 EXPECT_TRUE(QuitRunLoop()); 89 EXPECT_TRUE(QuitRunLoop());
90 host_->AddActivationParent(root->id());
90 } 91 }
91 92
92 void WindowServerTestBase::OnConnectionLost(WindowTreeConnection* connection) { 93 void WindowServerTestBase::OnConnectionLost(WindowTreeConnection* connection) {
93 window_tree_connection_destroyed_ = true; 94 window_tree_connection_destroyed_ = true;
94 } 95 }
95 96
96 void WindowServerTestBase::Create( 97 void WindowServerTestBase::Create(
97 mojo::ApplicationConnection* connection, 98 mojo::ApplicationConnection* connection,
98 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { 99 mojo::InterfaceRequest<mojom::WindowTreeClient> request) {
99 WindowTreeConnection::Create( 100 WindowTreeConnection::Create(
100 this, request.Pass(), 101 this, request.Pass(),
101 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); 102 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED);
102 } 103 }
103 104
104 } // namespace mus 105 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/window_server_test_base.h ('k') | components/mus/public/interfaces/window_tree_host.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698