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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "mojo/application/application_runner_chromium.h" | |
7 #include "mojo/public/c/system/main.h" | 6 #include "mojo/public/c/system/main.h" |
8 #include "mojo/public/cpp/application/application_delegate.h" | 7 #include "mojo/public/cpp/application/run_application.h" |
9 #include "mojo/public/cpp/application/application_impl.h" | 8 #include "mojo/public/cpp/application/service_provider_impl.h" |
10 #include "services/media/audio/audio_server_app.h" | 9 #include "services/media/audio/audio_server_app.h" |
11 | 10 |
12 namespace mojo { | 11 namespace mojo { |
13 namespace media { | 12 namespace media { |
14 namespace audio { | 13 namespace audio { |
15 | 14 |
16 AudioServerApp::AudioServerApp() {} | 15 AudioServerApp::AudioServerApp() {} |
16 | |
17 AudioServerApp::~AudioServerApp() {} | 17 AudioServerApp::~AudioServerApp() {} |
18 | 18 |
19 void AudioServerApp::Initialize(ApplicationImpl* app) { | 19 void AudioServerApp::OnInitialize() {} |
dalesat
2016/05/31 22:15:26
No longer calls server_impl_.Initialize, which bre
| |
20 server_impl_.Initialize(); | |
21 } | |
22 | 20 |
23 bool AudioServerApp::ConfigureIncomingConnection( | 21 bool AudioServerApp::OnAcceptConnection( |
24 ServiceProviderImpl* service_provider_impl) { | 22 ServiceProviderImpl* service_provider_impl) { |
25 service_provider_impl->AddService<AudioServer>( | 23 service_provider_impl->AddService<AudioServer>( |
26 [this](const ConnectionContext& connection_context, | 24 [this](const ConnectionContext& connection_context, |
27 InterfaceRequest<AudioServer> audio_server_request) { | 25 InterfaceRequest<AudioServer> audio_server_request) { |
28 bindings_.AddBinding(&server_impl_, audio_server_request.Pass()); | 26 bindings_.AddBinding(&server_impl_, audio_server_request.Pass()); |
29 }); | 27 }); |
30 return true; | 28 return true; |
31 } | 29 } |
32 | 30 |
33 void AudioServerApp::Quit() { | |
34 } | |
35 | |
36 } // namespace audio | 31 } // namespace audio |
37 } // namespace media | 32 } // namespace media |
38 } // namespace mojo | 33 } // namespace mojo |
39 | 34 |
40 MojoResult MojoMain(MojoHandle app_request) { | 35 MojoResult MojoMain(MojoHandle app_request) { |
41 mojo::ApplicationRunnerChromium runner( | 36 mojo::media::audio::AudioServerApp audio_server_app; |
42 new mojo::media::audio::AudioServerApp); | 37 return mojo::RunMainApplication(app_request, &audio_server_app); |
43 return runner.Run(app_request); | |
44 } | 38 } |
OLD | NEW |