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

Unified Diff: services/ui/view_manager/view_manager_app.cc

Issue 1980763002: ApplicationConnection devolution, part 2.3. (Closed) Base URL: https://github.com/domokit/mojo.git@work794_app_conn_devo_2.2
Patch Set: Created 4 years, 7 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
Index: services/ui/view_manager/view_manager_app.cc
diff --git a/services/ui/view_manager/view_manager_app.cc b/services/ui/view_manager/view_manager_app.cc
index 63ebbba4decdcc0405a2a926f36a4354472c7a04..ae5c2eb9d3ceb8517e4d4f52c3feb1e8e5e904ff 100644
--- a/services/ui/view_manager/view_manager_app.cc
+++ b/services/ui/view_manager/view_manager_app.cc
@@ -61,18 +61,16 @@ void ViewManagerApp::Initialize(mojo::ApplicationImpl* app_impl) {
bool ViewManagerApp::ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) {
- connection->AddService<mojo::ui::ViewManager>(this);
+ connection->GetServiceProviderImpl().AddService<mojo::ui::ViewManager>([this](
+ const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<mojo::ui::ViewManager> view_manager_request) {
+ DCHECK(registry_);
+ view_managers_.AddBinding(new ViewManagerImpl(registry_.get()),
+ view_manager_request.Pass());
+ });
return true;
}
-void ViewManagerApp::Create(
- const mojo::ConnectionContext& connection_context,
- mojo::InterfaceRequest<mojo::ui::ViewManager> request) {
- DCHECK(registry_);
- view_managers_.AddBinding(new ViewManagerImpl(registry_.get()),
- request.Pass());
-}
-
void ViewManagerApp::OnCompositorConnectionError() {
LOG(ERROR) << "Exiting due to compositor connection error.";
Shutdown();
« no previous file with comments | « services/ui/view_manager/view_manager_app.h ('k') | services/url_response_disk_cache/url_response_disk_cache_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698