| OLD | NEW |
| 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 "media/mojo/services/mojo_media_application.h" | 5 #include "media/mojo/services/mojo_media_application.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "media/base/media_log.h" | 10 #include "media/base/media_log.h" |
| 11 #include "media/mojo/services/mojo_media_client.h" | 11 #include "media/mojo/services/mojo_media_client.h" |
| 12 #include "media/mojo/services/service_factory_impl.h" | 12 #include "media/mojo/services/service_factory_impl.h" |
| 13 #include "mojo/application/public/cpp/application_connection.h" | 13 #include "mojo/shell/public/cpp/application_connection.h" |
| 14 #include "mojo/application/public/cpp/application_impl.h" | 14 #include "mojo/shell/public/cpp/application_impl.h" |
| 15 | 15 |
| 16 namespace media { | 16 namespace media { |
| 17 | 17 |
| 18 // static | 18 // static |
| 19 scoped_ptr<mojo::ApplicationDelegate> MojoMediaApplication::CreateApp() { | 19 scoped_ptr<mojo::ApplicationDelegate> MojoMediaApplication::CreateApp() { |
| 20 // In all existing use cases we don't need to initialize logging when using | 20 // In all existing use cases we don't need to initialize logging when using |
| 21 // CreateApp() to create the application. We can pass |enable_logging| in | 21 // CreateApp() to create the application. We can pass |enable_logging| in |
| 22 // CreateApp() if this isn't the case any more in the future. | 22 // CreateApp() if this isn't the case any more in the future. |
| 23 return scoped_ptr<mojo::ApplicationDelegate>( | 23 return scoped_ptr<mojo::ApplicationDelegate>( |
| 24 new MojoMediaApplication(false, MojoMediaClient::Create())); | 24 new MojoMediaApplication(false, MojoMediaClient::Create())); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 mojo::ApplicationConnection* connection, | 59 mojo::ApplicationConnection* connection, |
| 60 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { | 60 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { |
| 61 // The created object is owned by the pipe. | 61 // The created object is owned by the pipe. |
| 62 new ServiceFactoryImpl(std::move(request), connection->GetServiceProvider(), | 62 new ServiceFactoryImpl(std::move(request), connection->GetServiceProvider(), |
| 63 media_log_, | 63 media_log_, |
| 64 app_impl_->app_lifetime_helper()->CreateAppRefCount(), | 64 app_impl_->app_lifetime_helper()->CreateAppRefCount(), |
| 65 mojo_media_client_.get()); | 65 mojo_media_client_.get()); |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace media | 68 } // namespace media |
| OLD | NEW |