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 #ifndef SERVICES_MEDIA_AUDIO_AUDIO_SERVER_APP_H_ | 5 #ifndef SERVICES_MEDIA_AUDIO_AUDIO_SERVER_APP_H_ |
6 #define SERVICES_MEDIA_AUDIO_AUDIO_SERVER_APP_H_ | 6 #define SERVICES_MEDIA_AUDIO_AUDIO_SERVER_APP_H_ |
7 | 7 |
8 #include "mojo/common/binding_set.h" | 8 #include "mojo/common/binding_set.h" |
9 #include "mojo/public/cpp/application/application_delegate.h" | 9 #include "mojo/public/cpp/application/application_delegate.h" |
10 #include "mojo/public/cpp/application/interface_factory.h" | 10 #include "mojo/public/cpp/application/interface_factory.h" |
11 #include "mojo/services/media/audio/interfaces/audio_server.mojom.h" | 11 #include "mojo/services/media/audio/interfaces/audio_server.mojom.h" |
12 #include "services/media/audio/audio_server_impl.h" | 12 #include "services/media/audio/audio_server_impl.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace media { | 15 namespace media { |
16 namespace audio { | 16 namespace audio { |
17 | 17 |
18 class AudioServerApp : public ApplicationDelegate | 18 class AudioServerApp : public ApplicationDelegate, |
19 , public InterfaceFactory<AudioServer> { | 19 public InterfaceFactory<AudioServer> { |
20 public: | 20 public: |
21 // Constructor/Destructor | |
22 AudioServerApp(); | 21 AudioServerApp(); |
23 ~AudioServerApp() override; | 22 ~AudioServerApp() override; |
24 | 23 |
25 // ApplicationDelegate | 24 // ApplicationDelegate |
26 void Initialize(ApplicationImpl* app) override; | 25 void Initialize(ApplicationImpl* app) override; |
27 bool ConfigureIncomingConnection(ApplicationConnection* connection) override; | 26 bool ConfigureIncomingConnection(ApplicationConnection* connection) override; |
28 void Quit() override; | 27 void Quit() override; |
29 | 28 |
30 // InterfaceFactory<AudioServer> | 29 // InterfaceFactory<AudioServer> |
31 void Create(mojo::ApplicationConnection* connection, | 30 void Create(const ConnectionContext& connection_context, |
32 mojo::InterfaceRequest<AudioServer> request) override; | 31 InterfaceRequest<AudioServer> request) override; |
33 | 32 |
34 private: | 33 private: |
35 AudioServerImpl server_impl_; | 34 AudioServerImpl server_impl_; |
36 BindingSet<AudioServer> bindings_; | 35 BindingSet<AudioServer> bindings_; |
37 }; | 36 }; |
38 | 37 |
39 } // namespace audio | 38 } // namespace audio |
40 } // namespace media | 39 } // namespace media |
41 } // namespace mojo | 40 } // namespace mojo |
42 | 41 |
43 #endif // SERVICES_MEDIA_AUDIO_AUDIO_SERVER_APP_H_ | 42 #endif // SERVICES_MEDIA_AUDIO_AUDIO_SERVER_APP_H_ |
OLD | NEW |