OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/logging.h" |
| 6 #include "mojo/application/application_runner_chromium.h" |
| 7 #include "mojo/public/c/system/main.h" |
| 8 #include "mojo/public/cpp/application/application_delegate.h" |
| 9 #include "mojo/public/cpp/application/application_impl.h" |
| 10 #include "services/media/audio/audio_server_app.h" |
| 11 |
| 12 #define VERBOSE 0 |
| 13 |
| 14 namespace mojo { |
| 15 namespace media { |
| 16 namespace audio { |
| 17 |
| 18 AudioServerApp::AudioServerApp() {} |
| 19 AudioServerApp::~AudioServerApp() {} |
| 20 |
| 21 void AudioServerApp::Initialize(ApplicationImpl* app) { |
| 22 server_impl_.Initialize(); |
| 23 } |
| 24 |
| 25 bool AudioServerApp::ConfigureIncomingConnection( |
| 26 ApplicationConnection* connection) { |
| 27 connection->AddService(this); |
| 28 return true; |
| 29 } |
| 30 |
| 31 void AudioServerApp::Quit() { |
| 32 } |
| 33 |
| 34 void AudioServerApp::Create(ApplicationConnection* connection, |
| 35 InterfaceRequest<AudioServer> request) { |
| 36 bindings_.AddBinding(&server_impl_, request.Pass()); |
| 37 } |
| 38 |
| 39 } // namespace audio |
| 40 } // namespace media |
| 41 } // namespace mojo |
| 42 |
| 43 MojoResult MojoMain(MojoHandle app_request) { |
| 44 mojo::ApplicationRunnerChromium runner( |
| 45 new mojo::media::audio::AudioServerApp); |
| 46 return runner.Run(app_request); |
| 47 } |
OLD | NEW |