| 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 "media/base/media_log.h" | 9 #include "media/base/media_log.h" |
| 10 #include "media/mojo/services/mojo_media_client.h" | 10 #include "media/mojo/services/mojo_media_client.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 void MojoMediaApplication::Initialize(mojo::Shell* shell, | 33 void MojoMediaApplication::Initialize(mojo::Shell* shell, |
| 34 const std::string& url, | 34 const std::string& url, |
| 35 uint32_t id) { | 35 uint32_t id) { |
| 36 shell_ = shell; | 36 shell_ = shell; |
| 37 mojo_media_client_->Initialize(); | 37 mojo_media_client_->Initialize(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 bool MojoMediaApplication::AcceptConnection(mojo::Connection* connection) { | 40 bool MojoMediaApplication::AcceptConnection(mojo::Connection* connection) { |
| 41 connection->AddService<interfaces::ServiceFactory>(this); | 41 connection->AddInterface<interfaces::ServiceFactory>(this); |
| 42 return true; | 42 return true; |
| 43 } | 43 } |
| 44 | 44 |
| 45 void MojoMediaApplication::Create( | 45 void MojoMediaApplication::Create( |
| 46 mojo::Connection* connection, | 46 mojo::Connection* connection, |
| 47 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { | 47 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { |
| 48 // The created object is owned by the pipe. | 48 // The created object is owned by the pipe. |
| 49 new ServiceFactoryImpl(std::move(request), connection->GetServiceProvider(), | 49 new ServiceFactoryImpl(std::move(request), connection->GetRemoteInterfaces(), |
| 50 media_log_, shell_->CreateAppRefCount(), | 50 media_log_, shell_->CreateAppRefCount(), |
| 51 mojo_media_client_.get()); | 51 mojo_media_client_.get()); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace media | 54 } // namespace media |
| OLD | NEW |