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

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

Issue 2807203002: Use explicit conversion to base::Optional in MSVS::GetCurrentFormatImpl implementations. (Closed)
Patch Set: Created 3 years, 8 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 attempted_to_start_ = true; 98 attempted_to_start_ = true;
99 frame_callback_ = frame_callback; 99 frame_callback_ = frame_callback;
100 } 100 }
101 101
102 void MockMediaStreamVideoSource::StopSourceImpl() { 102 void MockMediaStreamVideoSource::StopSourceImpl() {
103 } 103 }
104 104
105 base::Optional<media::VideoCaptureFormat> 105 base::Optional<media::VideoCaptureFormat>
106 MockMediaStreamVideoSource::GetCurrentFormatImpl() const { 106 MockMediaStreamVideoSource::GetCurrentFormatImpl() const {
107 return format_; 107 return base::Optional<media::VideoCaptureFormat>(format_);
108 } 108 }
109 109
110 void MockMediaStreamVideoSource::DeliverVideoFrame( 110 void MockMediaStreamVideoSource::DeliverVideoFrame(
111 const scoped_refptr<media::VideoFrame>& frame) { 111 const scoped_refptr<media::VideoFrame>& frame) {
112 DCHECK(!frame_callback_.is_null()); 112 DCHECK(!frame_callback_.is_null());
113 io_task_runner()->PostTask( 113 io_task_runner()->PostTask(
114 FROM_HERE, base::Bind(frame_callback_, frame, base::TimeTicks())); 114 FROM_HERE, base::Bind(frame_callback_, frame, base::TimeTicks()));
115 } 115 }
116 116
117 } // namespace content 117 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698