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..ad5496b9f4c9e30ae604d70e3a7963a8e9cdaf81 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 |
+}; |
jennyz
2017/01/26 00:26:11
Why do we need this enum here? Isn't it defined in
shenghao
2017/01/29 10:21:01
We can't include //media/base/video_facing.h due t
|
+ |
+class VideoCaptureObserver { |
+ public: |
+ virtual void OnVideoCaptureStarted(VideoFacingMode facing) = 0; |
+ virtual void OnVideoCaptureStopped(VideoFacingMode facing) = 0; |
+}; |
+ |
class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer, |
public AudioPrefObserver, |
- public SessionManagerClient::Observer { |
+ public SessionManagerClient::Observer, |
+ public VideoCaptureObserver { |
jennyz
2017/01/26 00:26:12
Need to "#include media/base/video_facing.h".
shenghao
2017/01/29 10:21:01
We can't include //media/base/video_facing.h due t
|
public: |
- typedef std::priority_queue<AudioDevice, |
- std::vector<AudioDevice>, |
- AudioDeviceCompare> AudioDevicePriorityQueue; |
+ typedef std:: |
+ priority_queue<AudioDevice, std::vector<AudioDevice>, AudioDeviceCompare> |
+ AudioDevicePriorityQueue; |
jennyz
2017/01/26 00:26:12
Why change this line?
shenghao
2017/01/29 10:21:01
This is changed by "git cl format"
|
typedef std::vector<uint64_t> NodeIdList; |
// Volume change reasons that are not user-initiated. |
@@ -103,6 +118,9 @@ class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer, |
// Gets the global instance. Initialize must be called first. |
static CrasAudioHandler* Get(); |
+ void OnVideoCaptureStarted(VideoFacingMode facing) override; |
jennyz
2017/01/26 00:26:12
Add a line above like:
// media::VideoCaptureObser
shenghao
2017/01/29 10:21:01
It doesn't override media::VideoCaptureObserver. I
|
+ void OnVideoCaptureStopped(VideoFacingMode facing) override; |
+ |
// Adds an audio observer. |
void AddAudioObserver(AudioObserver* observer); |