OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 "chrome/browser/extensions/api/audio/audio_service.h" |
| 6 |
| 7 namespace extensions { |
| 8 |
| 9 class AudioServiceImpl : public AudioService { |
| 10 public: |
| 11 AudioServiceImpl() {} |
| 12 virtual ~AudioServiceImpl() {} |
| 13 |
| 14 // Called by listeners to this service to add/remove themselves as observers. |
| 15 virtual void AddObserver(Observer* observer); |
| 16 virtual void RemoveObserver(Observer* observer); |
| 17 |
| 18 // Start to query audio device information. |
| 19 virtual void StartGetInfo(const GetInfoCallback& callback); |
| 20 }; |
| 21 |
| 22 void AudioServiceImpl::AddObserver(Observer* observer) { |
| 23 // TODO: implement this for platforms other than Chrome OS. |
| 24 } |
| 25 |
| 26 void AudioServiceImpl::RemoveObserver(Observer* observer) { |
| 27 // TODO: implement this for platforms other than Chrome OS. |
| 28 } |
| 29 |
| 30 AudioService* AudioService::CreateInstance() { |
| 31 return new AudioServiceImpl; |
| 32 } |
| 33 |
| 34 void AudioServiceImpl::StartGetInfo(const GetInfoCallback& callback) { |
| 35 // TODO: implement this for platforms other than Chrome OS. |
| 36 if (!callback.is_null()) |
| 37 callback.Run(OutputInfo(), InputInfo(), false); |
| 38 } |
| 39 |
| 40 } // namespace extensions |
OLD | NEW |