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 #ifndef EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_ |
6 #define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_ | 6 #define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
14 #include "extensions/common/api/audio.h" | 14 #include "extensions/common/api/audio.h" |
15 | 15 |
16 namespace extensions { | 16 namespace extensions { |
17 | 17 |
18 using OutputInfo = std::vector<linked_ptr<core_api::audio::OutputDeviceInfo>>; | 18 using OutputInfo = std::vector<linked_ptr<api::audio::OutputDeviceInfo>>; |
19 using InputInfo = std::vector<linked_ptr<core_api::audio::InputDeviceInfo>>; | 19 using InputInfo = std::vector<linked_ptr<api::audio::InputDeviceInfo>>; |
20 using DeviceIdList = std::vector<std::string>; | 20 using DeviceIdList = std::vector<std::string>; |
21 using DeviceInfoList = | 21 using DeviceInfoList = std::vector<linked_ptr<api::audio::AudioDeviceInfo>>; |
22 std::vector<linked_ptr<core_api::audio::AudioDeviceInfo>>; | |
23 | 22 |
24 class AudioService { | 23 class AudioService { |
25 public: | 24 public: |
26 class Observer { | 25 class Observer { |
27 public: | 26 public: |
28 // Called when anything changes to the audio device configuration. | 27 // Called when anything changes to the audio device configuration. |
29 virtual void OnDeviceChanged() = 0; | 28 virtual void OnDeviceChanged() = 0; |
30 | 29 |
31 // Called when the sound level of an active audio device changes. | 30 // Called when the sound level of an active audio device changes. |
32 virtual void OnLevelChanged(const std::string& id, int level) = 0; | 31 virtual void OnLevelChanged(const std::string& id, int level) = 0; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 protected: | 77 protected: |
79 AudioService() {} | 78 AudioService() {} |
80 | 79 |
81 private: | 80 private: |
82 DISALLOW_COPY_AND_ASSIGN(AudioService); | 81 DISALLOW_COPY_AND_ASSIGN(AudioService); |
83 }; | 82 }; |
84 | 83 |
85 } // namespace extensions | 84 } // namespace extensions |
86 | 85 |
87 #endif // EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_ | 86 #endif // EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_ |
OLD | NEW |