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

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

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « mash/simple_wm/simple_wm.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/capture/video/fake_video_capture_device.h" 5 #include "media/capture/video/fake_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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 public: 82 public:
83 StubReadWritePermission(uint8_t* data) : data_(data) {} 83 StubReadWritePermission(uint8_t* data) : data_(data) {}
84 ~StubReadWritePermission() override { delete[] data_; } 84 ~StubReadWritePermission() override { delete[] data_; }
85 85
86 private: 86 private:
87 uint8_t* const data_; 87 uint8_t* const data_;
88 }; 88 };
89 89
90 VideoCaptureDevice::Client::Buffer CreateStubBuffer(int buffer_id, 90 VideoCaptureDevice::Client::Buffer CreateStubBuffer(int buffer_id,
91 size_t mapped_size) { 91 size_t mapped_size) {
92 auto buffer = new uint8_t[mapped_size]; 92 auto* buffer = new uint8_t[mapped_size];
93 const int arbitrary_frame_feedback_id = 0; 93 const int arbitrary_frame_feedback_id = 0;
94 return VideoCaptureDevice::Client::Buffer( 94 return VideoCaptureDevice::Client::Buffer(
95 buffer_id, arbitrary_frame_feedback_id, 95 buffer_id, arbitrary_frame_feedback_id,
96 base::MakeUnique<StubBufferHandleProvider>(mapped_size, buffer), 96 base::MakeUnique<StubBufferHandleProvider>(mapped_size, buffer),
97 base::MakeUnique<StubReadWritePermission>(buffer)); 97 base::MakeUnique<StubReadWritePermission>(buffer));
98 }; 98 };
99 99
100 class MockClient : public VideoCaptureDevice::Client { 100 class MockClient : public VideoCaptureDevice::Client {
101 public: 101 public:
102 MOCK_METHOD2(OnError, 102 MOCK_METHOD2(OnError,
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 20, 583 20,
584 3u, 584 3u,
585 {PIXEL_FORMAT_I420, PIXEL_FORMAT_Y16, PIXEL_FORMAT_I420}}, 585 {PIXEL_FORMAT_I420, PIXEL_FORMAT_Y16, PIXEL_FORMAT_I420}},
586 CommandLineTestData{ 586 CommandLineTestData{
587 "device-count=3,ownership=client", 587 "device-count=3,ownership=client",
588 20, 588 20,
589 3u, 589 3u,
590 {PIXEL_FORMAT_I420, PIXEL_FORMAT_Y16, PIXEL_FORMAT_I420}}, 590 {PIXEL_FORMAT_I420, PIXEL_FORMAT_Y16, PIXEL_FORMAT_I420}},
591 CommandLineTestData{"device-count=0", 20, 1u, {PIXEL_FORMAT_I420}})); 591 CommandLineTestData{"device-count=0", 20, 1u, {PIXEL_FORMAT_I420}}));
592 }; // namespace media 592 }; // namespace media
OLDNEW
« no previous file with comments | « mash/simple_wm/simple_wm.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698