| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 app_impl_ = app_impl; | 44 app_impl_ = app_impl; |
| 45 | 45 |
| 46 auto command_line = base::CommandLine::ForCurrentProcess(); | 46 auto command_line = base::CommandLine::ForCurrentProcess(); |
| 47 command_line->InitFromArgv(app_impl_->args()); | 47 command_line->InitFromArgv(app_impl_->args()); |
| 48 logging::LoggingSettings settings; | 48 logging::LoggingSettings settings; |
| 49 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 49 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 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 ServiceProviderImpl* service_provider_impl) { |
| 55 connection->GetServiceProviderImpl().AddService<ViewProvider>( | 55 service_provider_impl->AddService<ViewProvider>( |
| 56 [this](const ConnectionContext& connection_context, | 56 [this](const ConnectionContext& connection_context, |
| 57 InterfaceRequest<ViewProvider> view_provider_request) { | 57 InterfaceRequest<ViewProvider> view_provider_request) { |
| 58 bindings_.AddBinding( | 58 bindings_.AddBinding( |
| 59 new DelegatingViewProvider(this, connection_context.connection_url), | 59 new DelegatingViewProvider(this, connection_context.connection_url), |
| 60 view_provider_request.Pass()); | 60 view_provider_request.Pass()); |
| 61 }); | 61 }); |
| 62 return true; | 62 return true; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void ViewProviderApp::CreateView( | 65 void ViewProviderApp::CreateView( |
| 66 DelegatingViewProvider* provider, | 66 DelegatingViewProvider* provider, |
| 67 const std::string& view_provider_url, | 67 const std::string& view_provider_url, |
| 68 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, | 68 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, |
| 69 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 69 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
| 70 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) { | 70 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) { |
| 71 CreateView(view_provider_url, view_owner_request.Pass(), services.Pass(), | 71 CreateView(view_provider_url, view_owner_request.Pass(), services.Pass(), |
| 72 exposed_services.Pass()); | 72 exposed_services.Pass()); |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace ui | 75 } // namespace ui |
| 76 } // namespace mojo | 76 } // namespace mojo |
| OLD | NEW |