Index: media/base/video_facing.h |
diff --git a/media/base/video_facing.h b/media/base/video_facing.h |
index 9bd0b50e0a52421c1bc14af77c02d9a3f83c534d..e23e4b3c9574797c06fa467d40543998b9a943ff 100644 |
--- a/media/base/video_facing.h |
+++ b/media/base/video_facing.h |
@@ -5,6 +5,10 @@ |
#ifndef MEDIA_BASE_VIDEO_FACING_H_ |
#define MEDIA_BASE_VIDEO_FACING_H_ |
+#if defined(OS_CHROMEOS) |
+#include "chromeos/audio/cras_audio_handler.h" |
+#endif |
+ |
namespace media { |
// Facing mode for video capture. |
@@ -16,6 +20,27 @@ enum VideoFacingMode { |
NUM_MEDIA_VIDEO_FACING_MODE |
}; |
+class VideoCaptureObserver { |
+ public: |
+ virtual void OnVideoCaptureStarted(VideoFacingMode facing) = 0; |
+ virtual void OnVideoCaptureStopped(VideoFacingMode facing) = 0; |
+}; |
+ |
+class VideoCaptureObserverAdapter : public VideoCaptureObserver { |
chfremer
2017/01/30 19:49:28
The way this looks to me now is that VideoCaptureO
shenghao
2017/02/08 02:07:10
I name it to be VideoCaptureObserverChromeOS. The
|
+ public: |
+#if defined(OS_CHROMEOS) |
+ VideoCaptureObserverAdapter(chromeos::VideoCaptureObserver* observer); |
+#endif |
+ VideoCaptureObserverAdapter(); |
+ void OnVideoCaptureStarted(VideoFacingMode facing) override; |
+ void OnVideoCaptureStopped(VideoFacingMode facing) override; |
+ |
+#if defined(OS_CHROMEOS) |
+ private: |
+ chromeos::VideoCaptureObserver* const observer_; |
+#endif |
+}; |
+ |
} // namespace media |
#endif // MEDIA_BASE_VIDEO_FACING_H_ |