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

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

Issue 2490153003: [Mojo Video Capture] Replace const scoped_refptr<T>& with scoped_refptr<T> and use std::move (Closed)
Patch Set: fix bots Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/capture/video/video_capture_device.h" 5 #include "media/capture/video/video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 DoReserveOutputBuffer(); 128 DoReserveOutputBuffer();
129 NOTREACHED() << "This should never be called"; 129 NOTREACHED() << "This should never be called";
130 return std::unique_ptr<Buffer>(); 130 return std::unique_ptr<Buffer>();
131 } 131 }
132 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, 132 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
133 const VideoCaptureFormat& frame_format, 133 const VideoCaptureFormat& frame_format,
134 base::TimeTicks reference_time, 134 base::TimeTicks reference_time,
135 base::TimeDelta timestamp) override { 135 base::TimeDelta timestamp) override {
136 DoOnIncomingCapturedBuffer(); 136 DoOnIncomingCapturedBuffer();
137 } 137 }
138 void OnIncomingCapturedVideoFrame( 138 void OnIncomingCapturedVideoFrame(std::unique_ptr<Buffer> buffer,
139 std::unique_ptr<Buffer> buffer, 139 scoped_refptr<VideoFrame> frame) override {
140 const scoped_refptr<VideoFrame>& frame) override {
141 DoOnIncomingCapturedVideoFrame(); 140 DoOnIncomingCapturedVideoFrame();
142 } 141 }
143 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 142 std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
144 const gfx::Size& dimensions, 143 const gfx::Size& dimensions,
145 media::VideoPixelFormat format, 144 media::VideoPixelFormat format,
146 media::VideoPixelStorage storage) { 145 media::VideoPixelStorage storage) {
147 DoResurrectLastOutputBuffer(); 146 DoResurrectLastOutputBuffer();
148 NOTREACHED() << "This should never be called"; 147 NOTREACHED() << "This should never be called";
149 return std::unique_ptr<Buffer>(); 148 return std::unique_ptr<Buffer>();
150 } 149 }
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 629
631 device->GetPhotoCapabilities(std::move(scoped_get_callback)); 630 device->GetPhotoCapabilities(std::move(scoped_get_callback));
632 run_loop.Run(); 631 run_loop.Run();
633 632
634 ASSERT_TRUE(image_capture_client_->capabilities()); 633 ASSERT_TRUE(image_capture_client_->capabilities());
635 634
636 device->StopAndDeAllocate(); 635 device->StopAndDeAllocate();
637 } 636 }
638 637
639 }; // namespace media 638 }; // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698