OLD | NEW |
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 "mojo/ui/view_provider_app.h" | 5 #include "mojo/ui/view_provider_app.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 logging::InitLogging(settings); | 50 logging::InitLogging(settings); |
51 } | 51 } |
52 | 52 |
53 bool ViewProviderApp::ConfigureIncomingConnection( | 53 bool ViewProviderApp::ConfigureIncomingConnection( |
54 mojo::ApplicationConnection* connection) { | 54 mojo::ApplicationConnection* connection) { |
55 connection->AddService<mojo::ui::ViewProvider>(this); | 55 connection->AddService<mojo::ui::ViewProvider>(this); |
56 return true; | 56 return true; |
57 } | 57 } |
58 | 58 |
59 void ViewProviderApp::Create( | 59 void ViewProviderApp::Create( |
60 mojo::ApplicationConnection* connection, | 60 const mojo::ConnectionContext& connection_context, |
61 mojo::InterfaceRequest<mojo::ui::ViewProvider> request) { | 61 mojo::InterfaceRequest<mojo::ui::ViewProvider> request) { |
62 bindings_.AddBinding( | 62 bindings_.AddBinding( |
63 new DelegatingViewProvider(this, connection->GetConnectionURL()), | 63 new DelegatingViewProvider(this, connection_context.connection_url), |
64 request.Pass()); | 64 request.Pass()); |
65 } | 65 } |
66 | 66 |
67 void ViewProviderApp::CreateView( | 67 void ViewProviderApp::CreateView( |
68 DelegatingViewProvider* provider, | 68 DelegatingViewProvider* provider, |
69 const std::string& view_provider_url, | 69 const std::string& view_provider_url, |
70 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, | 70 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, |
71 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 71 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
72 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) { | 72 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) { |
73 CreateView(view_provider_url, view_owner_request.Pass(), services.Pass(), | 73 CreateView(view_provider_url, view_owner_request.Pass(), services.Pass(), |
74 exposed_services.Pass()); | 74 exposed_services.Pass()); |
75 } | 75 } |
76 | 76 |
77 } // namespace ui | 77 } // namespace ui |
78 } // namespace mojo | 78 } // namespace mojo |
OLD | NEW |