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

Side by Side Diff: media/capture/video/video_capture_device_info.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_info.h" 5 #include "media/capture/video/video_capture_device_info.h"
6 6
7 namespace media { 7 namespace media {
8 8
9 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo() { 9 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo() {
10 } 10 }
11 11
12 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo( 12 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo(
13 const VideoCaptureDevice::Name& name,
14 const VideoCaptureFormats& supported_formats)
15 : name(name), supported_formats(supported_formats) {
16 }
17
18 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo(
19 const VideoCaptureDeviceInfo& other) = default; 13 const VideoCaptureDeviceInfo& other) = default;
20 14
21 VideoCaptureDeviceInfo::~VideoCaptureDeviceInfo() { 15 VideoCaptureDeviceInfo::~VideoCaptureDeviceInfo() {
22 } 16 }
23 17
18 std::string VideoCaptureDeviceInfo::GetNameAndModel() const {
19 if (model_id.empty()) {
20 return descriptor.friendly_name;
21 }
mcasas 2016/07/26 23:52:04 No need for {} for one-line bodies (might not be f
chfremer 2016/07/27 23:10:18 Done.
22 return descriptor.friendly_name + " (" + model_id + ")";
23 }
24
24 } // namespace media 25 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698