Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1639)

Unified Diff: chromeos/audio/cras_audio_handler.h

Issue 2634263002: Pass camera facing info to audio client (Closed)
Patch Set: refactor to pass VideoCaptureObserver in setters, not in ctor Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/audio/cras_audio_handler.cc » ('j') | chromeos/audio/cras_audio_handler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chromeos/audio/cras_audio_handler.cc » ('j') | chromeos/audio/cras_audio_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698