Chromium Code Reviews| 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 399a68268fb53d60ec50ff65bd8e3e843eff8bcf..d771455922844e9bd1c75baf5dbde058b7b78182 100644 |
| --- a/media/video/capture/fake_video_capture_device.h |
| +++ b/media/video/capture/fake_video_capture_device.h |
| @@ -20,27 +20,18 @@ namespace media { |
| class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice { |
| public: |
| - static VideoCaptureDevice* Create(const Name& device_name); |
| - virtual ~FakeVideoCaptureDevice(); |
| - // 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 size_t NumberOfFakeDevices(); |
| + static const int kFakeCaptureTimeoutMs = 50; |
| - static void GetDeviceNames(Names* device_names); |
| - static void GetDeviceSupportedFormats(const Name& device, |
| - VideoCaptureFormats* supported_formats); |
| + FakeVideoCaptureDevice(); |
| + virtual ~FakeVideoCaptureDevice(); |
| // VideoCaptureDevice implementation. |
| - virtual void AllocateAndStart(const VideoCaptureParams& params, |
| - scoped_ptr<VideoCaptureDevice::Client> client) |
| - OVERRIDE; |
| + virtual void AllocateAndStart( |
| + const VideoCaptureParams& params, |
| + scoped_ptr<VideoCaptureDevice::Client> client) OVERRIDE; |
| virtual void StopAndDeAllocate() OVERRIDE; |
| private: |
| - FakeVideoCaptureDevice(); |
| - |
| // Called on the |capture_thread_| only. |
| void OnAllocateAndStart(const VideoCaptureParams& params, |
| scoped_ptr<Client> client); |
| @@ -66,13 +57,6 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice { |
| std::vector<VideoCaptureFormat> format_roster_; |
| int format_roster_index_; |
| - static bool fail_next_create_; |
|
perkj_chrome
2014/04/17 08:39:09
Jipii!!! Thanks.
mcasas
2014/04/23 06:20:28
Ack: the pleasure was all mine!
|
| - // |number_of_devices_| is atomic since tests can call SetNumberOfFakeDevices |
| - // on the IO thread to set |number_of_devices_|. The variable can be |
| - // read from a separate thread. |
| - // TODO(perkj): Make tests independent of global state. crbug/323913 |
| - static base::subtle::Atomic32 number_of_devices_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(FakeVideoCaptureDevice); |
| }; |