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