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

Side by Side Diff: components/mus/mus_app.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
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 "components/mus/mus_app.h" 5 #include "components/mus/mus_app.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "components/mus/common/args.h" 9 #include "components/mus/common/args.h"
10 #include "components/mus/gles2/gpu_impl.h" 10 #include "components/mus/gles2/gpu_impl.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // TODO(rjkroege): It is possible that we might want to generalize the 84 // TODO(rjkroege): It is possible that we might want to generalize the
85 // GpuState object. 85 // GpuState object.
86 if (!gpu_state_.get()) 86 if (!gpu_state_.get())
87 gpu_state_ = new GpuState(hardware_rendering_available); 87 gpu_state_ = new GpuState(hardware_rendering_available);
88 connection_manager_.reset(new ws::ConnectionManager(this, surfaces_state_)); 88 connection_manager_.reset(new ws::ConnectionManager(this, surfaces_state_));
89 89
90 tracing_.Initialize(shell, url); 90 tracing_.Initialize(shell, url);
91 } 91 }
92 92
93 bool MandolineUIServicesApp::AcceptConnection(Connection* connection) { 93 bool MandolineUIServicesApp::AcceptConnection(Connection* connection) {
94 connection->AddService<Gpu>(this); 94 connection->AddInterface<Gpu>(this);
95 connection->AddService<mojom::DisplayManager>(this); 95 connection->AddInterface<mojom::DisplayManager>(this);
96 connection->AddService<mojom::WindowManagerFactoryService>(this); 96 connection->AddInterface<mojom::WindowManagerFactoryService>(this);
97 connection->AddService<mojom::WindowTreeFactory>(this); 97 connection->AddInterface<mojom::WindowTreeFactory>(this);
98 connection->AddService<WindowTreeHostFactory>(this); 98 connection->AddInterface<WindowTreeHostFactory>(this);
99 return true; 99 return true;
100 } 100 }
101 101
102 void MandolineUIServicesApp::OnFirstRootConnectionCreated() { 102 void MandolineUIServicesApp::OnFirstRootConnectionCreated() {
103 PendingRequests requests; 103 PendingRequests requests;
104 requests.swap(pending_requests_); 104 requests.swap(pending_requests_);
105 for (auto& request : requests) { 105 for (auto& request : requests) {
106 if (request->dm_request) 106 if (request->dm_request)
107 Create(nullptr, std::move(*request->dm_request)); 107 Create(nullptr, std::move(*request->dm_request));
108 else 108 else
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 ws::WindowTreeHostImpl* host_impl = new ws::WindowTreeHostImpl( 187 ws::WindowTreeHostImpl* host_impl = new ws::WindowTreeHostImpl(
188 connection_manager_.get(), shell_, gpu_state_, surfaces_state_); 188 connection_manager_.get(), shell_, gpu_state_, surfaces_state_);
189 189
190 // WindowTreeHostConnection manages its own lifetime. 190 // WindowTreeHostConnection manages its own lifetime.
191 host_impl->Init(new ws::WindowTreeHostConnectionImpl( 191 host_impl->Init(new ws::WindowTreeHostConnectionImpl(
192 std::move(host), make_scoped_ptr(host_impl), std::move(tree_client), 192 std::move(host), make_scoped_ptr(host_impl), std::move(tree_client),
193 connection_manager_.get())); 193 connection_manager_.get()));
194 } 194 }
195 195
196 } // namespace mus 196 } // namespace mus
OLDNEW
« no previous file with comments | « components/html_viewer/stats_collection_controller.cc ('k') | components/mus/public/cpp/tests/window_server_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698