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

Side by Side Diff: media/video/capture/fake_video_capture_device_unittest.cc

Issue 623263003: replace OVERRIDE and FINAL with override and final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "media/video/capture/fake_video_capture_device.h" 10 #include "media/video/capture/fake_video_capture_device.h"
(...skipping 11 matching lines...) Expand all
22 class MockClient : public media::VideoCaptureDevice::Client { 22 class MockClient : public media::VideoCaptureDevice::Client {
23 public: 23 public:
24 MOCK_METHOD2(ReserveOutputBuffer, 24 MOCK_METHOD2(ReserveOutputBuffer,
25 scoped_refptr<Buffer>(media::VideoFrame::Format format, 25 scoped_refptr<Buffer>(media::VideoFrame::Format format,
26 const gfx::Size& dimensions)); 26 const gfx::Size& dimensions));
27 MOCK_METHOD0(OnErr, void()); 27 MOCK_METHOD0(OnErr, void());
28 28
29 explicit MockClient(base::Callback<void(const VideoCaptureFormat&)> frame_cb) 29 explicit MockClient(base::Callback<void(const VideoCaptureFormat&)> frame_cb)
30 : main_thread_(base::MessageLoopProxy::current()), frame_cb_(frame_cb) {} 30 : main_thread_(base::MessageLoopProxy::current()), frame_cb_(frame_cb) {}
31 31
32 virtual void OnError(const std::string& error_message) OVERRIDE { 32 virtual void OnError(const std::string& error_message) override {
33 OnErr(); 33 OnErr();
34 } 34 }
35 35
36 virtual void OnIncomingCapturedData(const uint8* data, 36 virtual void OnIncomingCapturedData(const uint8* data,
37 int length, 37 int length,
38 const VideoCaptureFormat& format, 38 const VideoCaptureFormat& format,
39 int rotation, 39 int rotation,
40 base::TimeTicks timestamp) OVERRIDE { 40 base::TimeTicks timestamp) override {
41 main_thread_->PostTask(FROM_HERE, base::Bind(frame_cb_, format)); 41 main_thread_->PostTask(FROM_HERE, base::Bind(frame_cb_, format));
42 } 42 }
43 43
44 virtual void OnIncomingCapturedVideoFrame( 44 virtual void OnIncomingCapturedVideoFrame(
45 const scoped_refptr<Buffer>& buffer, 45 const scoped_refptr<Buffer>& buffer,
46 const media::VideoCaptureFormat& buffer_format, 46 const media::VideoCaptureFormat& buffer_format,
47 const scoped_refptr<media::VideoFrame>& frame, 47 const scoped_refptr<media::VideoFrame>& frame,
48 base::TimeTicks timestamp) OVERRIDE { 48 base::TimeTicks timestamp) override {
49 NOTREACHED(); 49 NOTREACHED();
50 } 50 }
51 51
52 private: 52 private:
53 scoped_refptr<base::SingleThreadTaskRunner> main_thread_; 53 scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
54 base::Callback<void(const VideoCaptureFormat&)> frame_cb_; 54 base::Callback<void(const VideoCaptureFormat&)> frame_cb_;
55 }; 55 };
56 56
57 class DeviceEnumerationListener : 57 class DeviceEnumerationListener :
58 public base::RefCounted<DeviceEnumerationListener> { 58 public base::RefCounted<DeviceEnumerationListener> {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 // We set TimeWait to 200 action timeouts and this should be enough for at 201 // We set TimeWait to 200 action timeouts and this should be enough for at
202 // least action_count/kFakeCaptureCapabilityChangePeriod calls. 202 // least action_count/kFakeCaptureCapabilityChangePeriod calls.
203 for (int i = 0; i < action_count; ++i) { 203 for (int i = 0; i < action_count; ++i) {
204 WaitForCapturedFrame(); 204 WaitForCapturedFrame();
205 } 205 }
206 device->StopAndDeAllocate(); 206 device->StopAndDeAllocate();
207 } 207 }
208 208
209 }; // namespace media 209 }; // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/fake_video_capture_device_factory.h ('k') | media/video/capture/file_video_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698