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

Unified Diff: content/public/browser/media_capture_devices.h

Issue 183743021: Implement MediaCaptureDevices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
Index: content/public/browser/media_capture_devices.h
diff --git a/content/public/browser/media_capture_devices.h b/content/public/browser/media_capture_devices.h
new file mode 100644
index 0000000000000000000000000000000000000000..88bc0b8bbe22c029cecf094e6d4abff4bd5124ad
--- /dev/null
+++ b/content/public/browser/media_capture_devices.h
@@ -0,0 +1,31 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_MEDIA_CAPTURE_DEVICES_H_
+#define CONTENT_PUBLIC_BROWSER_MEDIA_CAPTURE_DEVICES_H_
+
+#include "content/public/common/media_stream_request.h"
+
+namespace content {
+
+// This is a singleton class, used to get Audio/Video devices.
Sergey Ulanov 2014/03/06 08:26:40 Please mention that it must be used on the UI thre
michaelbai 2014/03/06 19:27:20 Done.
+CONTENT_EXPORT class MediaCaptureDevices {
Sergey Ulanov 2014/03/06 08:26:40 CONTENT_EXPORT should be between 'class' and the c
Sergey Ulanov 2014/03/06 08:26:40 Does this class need to be be a singleton? E.g. ca
michaelbai 2014/03/06 19:27:20 Done.
michaelbai 2014/03/06 19:27:20 MediaStreamManager is not content API, browser can
+ public:
+ // Get signleton instance of MediaCaptureDevices.
+ static MediaCaptureDevices* GetInstance();
+
+ // Return all Audio/Video devices.
+ virtual const MediaStreamDevices& GetAudioCaptureDevices() = 0;
+ virtual const MediaStreamDevices& GetVideoCaptureDevices() = 0;
+
+ private:
+ // This interface should only be implemented inside content.
+ friend class MediaCaptureDevicesImpl;
+ MediaCaptureDevices() {}
+ virtual ~MediaCaptureDevices() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_MEDIA_CAPTURE_DEVICES_H_

Powered by Google App Engine
This is Rietveld 408576698