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

Side by Side Diff: content/renderer/media/mock_media_stream_video_source.cc

Issue 2970823003: Rename MediaStreamVideoSource:GetCurrentFormatImpl() to GetCurrentFormat() (Closed)
Patch Set: Created 3 years, 5 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 "content/renderer/media/mock_media_stream_video_source.h" 5 #include "content/renderer/media/mock_media_stream_video_source.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const VideoCaptureDeliverFrameCB& frame_callback) { 60 const VideoCaptureDeliverFrameCB& frame_callback) {
61 DCHECK(frame_callback_.is_null()); 61 DCHECK(frame_callback_.is_null());
62 attempted_to_start_ = true; 62 attempted_to_start_ = true;
63 frame_callback_ = frame_callback; 63 frame_callback_ = frame_callback;
64 } 64 }
65 65
66 void MockMediaStreamVideoSource::StopSourceImpl() { 66 void MockMediaStreamVideoSource::StopSourceImpl() {
67 } 67 }
68 68
69 base::Optional<media::VideoCaptureFormat> 69 base::Optional<media::VideoCaptureFormat>
70 MockMediaStreamVideoSource::GetCurrentFormatImpl() const { 70 MockMediaStreamVideoSource::GetCurrentFormat() const {
71 return base::Optional<media::VideoCaptureFormat>(format_); 71 return base::Optional<media::VideoCaptureFormat>(format_);
hbos_chromium 2017/07/04 14:34:29 We DCHECK with the sequence_checker_, it's protect
Guido Urdaneta 2017/07/05 15:28:25 There is no sequence_checker_ in this class. Did y
hbos_chromium 2017/07/05 15:33:30 There's SEQUENCE_CHECKER(sequence_checker_) in Med
Guido Urdaneta 2017/07/05 16:03:46 Done. Also filed crbug.com/739393 to add sequence
72 } 72 }
73 73
74 void MockMediaStreamVideoSource::DeliverVideoFrame( 74 void MockMediaStreamVideoSource::DeliverVideoFrame(
75 const scoped_refptr<media::VideoFrame>& frame) { 75 const scoped_refptr<media::VideoFrame>& frame) {
76 DCHECK(!frame_callback_.is_null()); 76 DCHECK(!frame_callback_.is_null());
77 io_task_runner()->PostTask( 77 io_task_runner()->PostTask(
78 FROM_HERE, base::Bind(frame_callback_, frame, base::TimeTicks())); 78 FROM_HERE, base::Bind(frame_callback_, frame, base::TimeTicks()));
79 } 79 }
80 80
81 } // namespace content 81 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698