Chromium Code Reviews

Side by Side Diff: services/ui/view_manager/view_manager_app.cc

Issue 1975993002: Change InterfaceFactory<I>::Create() to take a ConnectionContext instead of an ApplicationConnectio… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 "services/ui/view_manager/view_manager_app.h" 5 #include "services/ui/view_manager/view_manager_app.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 48 matching lines...)
59 base::Unretained(this))); 59 base::Unretained(this)));
60 } 60 }
61 61
62 bool ViewManagerApp::ConfigureIncomingConnection( 62 bool ViewManagerApp::ConfigureIncomingConnection(
63 mojo::ApplicationConnection* connection) { 63 mojo::ApplicationConnection* connection) {
64 connection->AddService<mojo::ui::ViewManager>(this); 64 connection->AddService<mojo::ui::ViewManager>(this);
65 return true; 65 return true;
66 } 66 }
67 67
68 void ViewManagerApp::Create( 68 void ViewManagerApp::Create(
69 mojo::ApplicationConnection* connection, 69 const mojo::ConnectionContext& connection_context,
70 mojo::InterfaceRequest<mojo::ui::ViewManager> request) { 70 mojo::InterfaceRequest<mojo::ui::ViewManager> request) {
71 DCHECK(registry_); 71 DCHECK(registry_);
72 view_managers_.AddBinding(new ViewManagerImpl(registry_.get()), 72 view_managers_.AddBinding(new ViewManagerImpl(registry_.get()),
73 request.Pass()); 73 request.Pass());
74 } 74 }
75 75
76 void ViewManagerApp::OnCompositorConnectionError() { 76 void ViewManagerApp::OnCompositorConnectionError() {
77 LOG(ERROR) << "Exiting due to compositor connection error."; 77 LOG(ERROR) << "Exiting due to compositor connection error.";
78 Shutdown(); 78 Shutdown();
79 } 79 }
80 80
81 void ViewManagerApp::OnAssociateConnectionError(const std::string& url) { 81 void ViewManagerApp::OnAssociateConnectionError(const std::string& url) {
82 LOG(ERROR) << "Exiting due to view associate connection error: url=" << url; 82 LOG(ERROR) << "Exiting due to view associate connection error: url=" << url;
83 Shutdown(); 83 Shutdown();
84 } 84 }
85 85
86 void ViewManagerApp::Shutdown() { 86 void ViewManagerApp::Shutdown() {
87 app_impl_->Terminate(); 87 app_impl_->Terminate();
88 } 88 }
89 89
90 } // namespace view_manager 90 } // namespace view_manager
OLDNEW
« 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