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

Unified Diff: chromeos/audio/cras_audio_handler.h

Issue 2634263002: Pass camera facing info to audio client (Closed)
Patch Set: Address comments 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') | content/browser/browser_main_loop.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..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);
« no previous file with comments | « no previous file | chromeos/audio/cras_audio_handler.cc » ('j') | content/browser/browser_main_loop.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698