Chromium Code Reviews| Index: chromeos/audio/cras_audio_handler.h |
| diff --git a/chromeos/audio/cras_audio_handler.h b/chromeos/audio/cras_audio_handler.h |
| index 1408f061f5d103fc56b55aed917072477056c511..dce24683ba91a84e2df7517eaf8b6fe709a1619e 100644 |
| --- a/chromeos/audio/cras_audio_handler.h |
| +++ b/chromeos/audio/cras_audio_handler.h |
| @@ -26,13 +26,28 @@ namespace chromeos { |
| class AudioDevicesPrefHandler; |
| +enum class VideoFacingMode { |
| + NONE = 0, |
| + // Video device is facing the user. I.e. front camera. |
| + USER, |
| + // Video device is facing the environment. I.e. back camera. |
| + ENVIRONMENT |
| +}; |
| + |
| +class VideoCaptureObserver { |
| + public: |
| + virtual void OnVideoCaptureStarted(VideoFacingMode facing) = 0; |
| + virtual void OnVideoCaptureStopped(VideoFacingMode facing) = 0; |
| +}; |
|
jennyz
2017/02/03 22:44:13
It is kind of a little weird to define a VideoCapt
shenghao
2017/02/08 02:07:09
Talked offline with Jenny. She is trying to find a
jennyz
2017/02/08 22:21:33
Have you tried to make a separate target for the m
shenghao
2017/02/09 02:08:51
Removed this part.
|
| + |
| class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer, |
| public AudioPrefObserver, |
| - public SessionManagerClient::Observer { |
| + public SessionManagerClient::Observer, |
| + public VideoCaptureObserver { |
| public: |
| - typedef std::priority_queue<AudioDevice, |
| - std::vector<AudioDevice>, |
| - AudioDeviceCompare> AudioDevicePriorityQueue; |
| + typedef std:: |
| + priority_queue<AudioDevice, std::vector<AudioDevice>, AudioDeviceCompare> |
| + AudioDevicePriorityQueue; |
| typedef std::vector<uint64_t> NodeIdList; |
| // Volume change reasons that are not user-initiated. |
| @@ -103,6 +118,10 @@ class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer, |
| // Gets the global instance. Initialize must be called first. |
| static CrasAudioHandler* Get(); |
| + // Overrides VideoCaptureObserver. |
| + void OnVideoCaptureStarted(VideoFacingMode facing) override; |
| + void OnVideoCaptureStopped(VideoFacingMode facing) override; |
| + |
| // Adds an audio observer. |
| void AddAudioObserver(AudioObserver* observer); |