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

Unified Diff: components/mus/mus_app.cc

Issue 1764483003: Changes ownership of ClientConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/mus_app.h ('k') | components/mus/ws/client_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/mus_app.cc
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc
index 7fed4b7b14b4d9dd1442ebc9720bdf882b96049c..ad5f02075100e0f64551cab8e9712b7e20fed0e2 100644
--- a/components/mus/mus_app.cc
+++ b/components/mus/mus_app.cc
@@ -160,42 +160,14 @@ void MandolineUIServicesApp::OnNoMoreRootConnections() {
base::MessageLoop::current()->QuitWhenIdle();
}
-ws::ClientConnection*
+scoped_ptr<ws::ClientConnection>
MandolineUIServicesApp::CreateClientConnectionForEmbedAtWindow(
ws::ConnectionManager* connection_manager,
+ ws::WindowTreeImpl* tree,
mojom::WindowTreeRequest tree_request,
- ws::ServerWindow* root,
- uint32_t policy_bitmask,
mojom::WindowTreeClientPtr client) {
- scoped_ptr<ws::WindowTreeImpl> service(
- new ws::WindowTreeImpl(connection_manager, root, policy_bitmask));
- return new ws::DefaultClientConnection(std::move(service), connection_manager,
- std::move(tree_request),
- std::move(client));
-}
-
-ws::ClientConnection*
-MandolineUIServicesApp::CreateClientConnectionForWindowManager(
- ws::WindowTreeHostImpl* tree_host,
- ws::ServerWindow* window,
- const mojom::Display& display,
- uint32_t user_id,
- mojom::WindowManagerFactory* factory) {
- // TODO(sky): figure out a better way to factor this. Having the delegate
- // have to add to the ConnectionManager is ick!
- mojom::WindowTreeClientPtr tree_client;
- factory->CreateWindowManager(display.Clone(), GetProxy(&tree_client));
- scoped_ptr<ws::WindowTreeImpl> service(
- new ws::WindowTreeImpl(connection_manager_.get(), window,
- mojom::WindowTree::kAccessPolicyEmbedRoot));
- scoped_ptr<ws::DefaultClientConnection> connection(
- new ws::DefaultClientConnection(std::move(service),
- connection_manager_.get(),
- std::move(tree_client)));
- mojom::WindowTreePtr tree = connection->CreateInterfacePtrAndBind();
- ws::DefaultClientConnection* raw_connection = connection.get();
- connection_manager_->AddConnection(std::move(connection), std::move(tree));
- return raw_connection;
+ return make_scoped_ptr(new ws::DefaultClientConnection(
+ tree, connection_manager, std::move(tree_request), std::move(client)));
}
void MandolineUIServicesApp::CreateDefaultWindowTreeHosts() {
« no previous file with comments | « components/mus/mus_app.h ('k') | components/mus/ws/client_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698