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 19 matching lines...) Expand all Loading... |
30 uint32_t /* id */) { | 30 uint32_t /* id */) { |
31 connector_ = connector; | 31 connector_ = connector; |
32 mojo_media_client_->Initialize(); | 32 mojo_media_client_->Initialize(); |
33 } | 33 } |
34 | 34 |
35 bool MojoMediaApplication::AcceptConnection(shell::Connection* connection) { | 35 bool MojoMediaApplication::AcceptConnection(shell::Connection* connection) { |
36 connection->AddInterface<interfaces::ServiceFactory>(this); | 36 connection->AddInterface<interfaces::ServiceFactory>(this); |
37 return true; | 37 return true; |
38 } | 38 } |
39 | 39 |
| 40 bool MojoMediaApplication::ShellConnectionLost() { |
| 41 mojo_media_client_->WillQuit(); |
| 42 return true; |
| 43 } |
| 44 |
40 void MojoMediaApplication::Create( | 45 void MojoMediaApplication::Create( |
41 shell::Connection* connection, | 46 shell::Connection* connection, |
42 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { | 47 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { |
43 // The created object is owned by the pipe. | 48 // The created object is owned by the pipe. |
44 new ServiceFactoryImpl(std::move(request), connection->GetRemoteInterfaces(), | 49 new ServiceFactoryImpl(std::move(request), connection->GetRemoteInterfaces(), |
45 media_log_, ref_factory_.CreateRef(), | 50 media_log_, ref_factory_.CreateRef(), |
46 mojo_media_client_.get()); | 51 mojo_media_client_.get()); |
47 } | 52 } |
48 | 53 |
49 } // namespace media | 54 } // namespace media |
OLD | NEW |