| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 "extensions/browser/api/audio/audio_service.h" | 5 #include "extensions/browser/api/audio/audio_service.h" |
| 6 | 6 |
| 7 namespace extensions { | 7 namespace extensions { |
| 8 | 8 |
| 9 class AudioServiceImpl : public AudioService { | 9 class AudioServiceImpl : public AudioService { |
| 10 public: | 10 public: |
| 11 AudioServiceImpl() {} | 11 AudioServiceImpl() {} |
| 12 ~AudioServiceImpl() override {} | 12 ~AudioServiceImpl() override {} |
| 13 | 13 |
| 14 // Called by listeners to this service to add/remove themselves as observers. | 14 // Called by listeners to this service to add/remove themselves as observers. |
| 15 void AddObserver(Observer* observer) override; | 15 void AddObserver(Observer* observer) override; |
| 16 void RemoveObserver(Observer* observer) override; | 16 void RemoveObserver(Observer* observer) override; |
| 17 | 17 |
| 18 // Start to query audio device information. | 18 // Start to query audio device information. |
| 19 bool GetInfo(OutputInfo* output_info_out, InputInfo* input_info_out) override; | 19 bool GetInfo(OutputInfo* output_info_out, InputInfo* input_info_out) override; |
| 20 bool GetDevices(const api::audio::DeviceFilter* filter, |
| 21 DeviceInfoList* devices_out) override; |
| 20 void SetActiveDevices(const DeviceIdList& device_list) override; | 22 void SetActiveDevices(const DeviceIdList& device_list) override; |
| 21 bool SetActiveDeviceLists( | 23 bool SetActiveDeviceLists( |
| 22 const std::unique_ptr<DeviceIdList>& input_devices, | 24 const std::unique_ptr<DeviceIdList>& input_devices, |
| 23 const std::unique_ptr<DeviceIdList>& output_devives) override; | 25 const std::unique_ptr<DeviceIdList>& output_devives) override; |
| 24 bool SetDeviceSoundLevel(const std::string& device_id, | 26 bool SetDeviceSoundLevel(const std::string& device_id, |
| 25 int volume, | 27 int volume, |
| 26 int gain) override; | 28 int gain) override; |
| 27 bool SetMuteForDevice(const std::string& device_id, bool value) override; | 29 bool SetMuteForDevice(const std::string& device_id, bool value) override; |
| 28 bool SetMute(bool is_input, bool value) override; | 30 bool SetMute(bool is_input, bool value) override; |
| 29 bool GetMute(bool is_input, bool* value) override; | 31 bool GetMute(bool is_input, bool* value) override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 40 AudioService* AudioService::CreateInstance() { | 42 AudioService* AudioService::CreateInstance() { |
| 41 return new AudioServiceImpl; | 43 return new AudioServiceImpl; |
| 42 } | 44 } |
| 43 | 45 |
| 44 bool AudioServiceImpl::GetInfo(OutputInfo* output_info_out, | 46 bool AudioServiceImpl::GetInfo(OutputInfo* output_info_out, |
| 45 InputInfo* input_info_out) { | 47 InputInfo* input_info_out) { |
| 46 // TODO: implement this for platforms other than Chrome OS. | 48 // TODO: implement this for platforms other than Chrome OS. |
| 47 return false; | 49 return false; |
| 48 } | 50 } |
| 49 | 51 |
| 52 bool AudioServiceImpl::GetDevices(const api::audio::DeviceFilter* filter, |
| 53 DeviceInfoList* devices_out) { |
| 54 return false; |
| 55 } |
| 56 |
| 50 bool AudioServiceImpl::SetActiveDeviceLists( | 57 bool AudioServiceImpl::SetActiveDeviceLists( |
| 51 const std::unique_ptr<DeviceIdList>& input_devices, | 58 const std::unique_ptr<DeviceIdList>& input_devices, |
| 52 const std::unique_ptr<DeviceIdList>& output_devives) { | 59 const std::unique_ptr<DeviceIdList>& output_devives) { |
| 53 return false; | 60 return false; |
| 54 } | 61 } |
| 55 | 62 |
| 56 void AudioServiceImpl::SetActiveDevices(const DeviceIdList& device_list) { | 63 void AudioServiceImpl::SetActiveDevices(const DeviceIdList& device_list) { |
| 57 } | 64 } |
| 58 | 65 |
| 59 bool AudioServiceImpl::SetDeviceSoundLevel(const std::string& device_id, | 66 bool AudioServiceImpl::SetDeviceSoundLevel(const std::string& device_id, |
| 60 int volume, | 67 int volume, |
| 61 int gain) { | 68 int gain) { |
| 62 return false; | 69 return false; |
| 63 } | 70 } |
| 64 | 71 |
| 65 bool AudioServiceImpl::SetMuteForDevice(const std::string& device_id, | 72 bool AudioServiceImpl::SetMuteForDevice(const std::string& device_id, |
| 66 bool value) { | 73 bool value) { |
| 67 return false; | 74 return false; |
| 68 } | 75 } |
| 69 | 76 |
| 70 bool AudioServiceImpl::SetMute(bool is_input, bool value) { | 77 bool AudioServiceImpl::SetMute(bool is_input, bool value) { |
| 71 return false; | 78 return false; |
| 72 } | 79 } |
| 73 | 80 |
| 74 bool AudioServiceImpl::GetMute(bool is_input, bool* value) { | 81 bool AudioServiceImpl::GetMute(bool is_input, bool* value) { |
| 75 return false; | 82 return false; |
| 76 } | 83 } |
| 77 | 84 |
| 78 } // namespace extensions | 85 } // namespace extensions |
| OLD | NEW |