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

Unified Diff: media/video/capture/fake_video_capture_device.h

Issue 88283002: Reland review 34393006: Refactor MediaStreamManager to not output real device id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make sure devices are not enumerated unless there is a valid security origin. Created 7 years, 1 month 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: media/video/capture/fake_video_capture_device.h
diff --git a/media/video/capture/fake_video_capture_device.h b/media/video/capture/fake_video_capture_device.h
index 7d5de57d2ce0df9b75fc7bd1113eaf838346794c..2465b5f020a3c7f5755aa85b4e6bd2adeb627683 100644
--- a/media/video/capture/fake_video_capture_device.h
+++ b/media/video/capture/fake_video_capture_device.h
@@ -10,6 +10,7 @@
#include <string>
+#include "base/atomicops.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread.h"
#include "media/video/capture/video_capture_device.h"
@@ -23,6 +24,7 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
// Used for testing. This will make sure the next call to Create will
// return NULL;
static void SetFailNextCreate();
+ static void SetNumberOfFakeDevices(size_t number_of_devices);
static void GetDeviceNames(Names* device_names);
static void GetDeviceSupportedFormats(const Name& device,
@@ -64,6 +66,7 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
int format_roster_index_;
static bool fail_next_create_;
+ static base::subtle::Atomic32 number_of_devices_;
DISALLOW_COPY_AND_ASSIGN(FakeVideoCaptureDevice);
};

Powered by Google App Engine
This is Rietveld 408576698