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

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

Issue 2169013002: Change class VideoCaptureDevice::Name to struct VideoCaptureDeviceDescriptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed emircan's comments Created 4 years, 4 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 "media/capture/video/video_capture_device_factory.h" 5 #include "media/capture/video/video_capture_device_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 24 matching lines...) Expand all
35 // screen rotations. 35 // screen rotations.
36 return std::unique_ptr<VideoCaptureDeviceFactory>( 36 return std::unique_ptr<VideoCaptureDeviceFactory>(
37 CreateVideoCaptureDeviceFactory(ui_task_runner)); 37 CreateVideoCaptureDeviceFactory(ui_task_runner));
38 } 38 }
39 } 39 }
40 40
41 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { 41 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() {
42 thread_checker_.DetachFromThread(); 42 thread_checker_.DetachFromThread();
43 } 43 }
44 44
45 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() { 45 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() {
mcasas 2016/07/26 23:52:04 nit: I might be wrong, but I believe empty functio
chfremer 2016/07/27 23:10:18 Done.
46 } 46 }
47 47
48 void VideoCaptureDeviceFactory::EnumerateDeviceNames( 48 void VideoCaptureDeviceFactory::EnumerateDeviceDescriptors(
49 const base::Callback< 49 const base::Callback<void(std::unique_ptr<VideoCaptureDeviceDescriptors>)>&
50 void(std::unique_ptr<media::VideoCaptureDevice::Names>)>& callback) { 50 callback) {
51 DCHECK(thread_checker_.CalledOnValidThread()); 51 DCHECK(thread_checker_.CalledOnValidThread());
52 DCHECK(!callback.is_null()); 52 DCHECK(!callback.is_null());
53 std::unique_ptr<VideoCaptureDevice::Names> device_names( 53 std::unique_ptr<VideoCaptureDeviceDescriptors> device_descriptors(
54 new VideoCaptureDevice::Names()); 54 new VideoCaptureDeviceDescriptors());
55 GetDeviceNames(device_names.get()); 55 GetDeviceDescriptors(device_descriptors.get());
56 callback.Run(std::move(device_names)); 56 callback.Run(std::move(device_descriptors));
57 } 57 }
58 58
59 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ 59 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \
60 !defined(OS_WIN) 60 !defined(OS_WIN)
61 // static 61 // static
62 VideoCaptureDeviceFactory* 62 VideoCaptureDeviceFactory*
63 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 63 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
64 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 64 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
65 NOTIMPLEMENTED(); 65 NOTIMPLEMENTED();
66 return NULL; 66 return NULL;
67 } 67 }
68 #endif 68 #endif
69 69
70 } // namespace media 70 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698