Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "content/public/common/media_stream_request.h" | 5 #include "content/public/common/media_stream_request.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 | 76 |
| 77 const MediaStreamDevice* MediaStreamDevices::FindById( | 77 const MediaStreamDevice* MediaStreamDevices::FindById( |
| 78 const std::string& device_id) const { | 78 const std::string& device_id) const { |
| 79 for (const_iterator iter = begin(); iter != end(); ++iter) { | 79 for (const_iterator iter = begin(); iter != end(); ++iter) { |
| 80 if (iter->id == device_id) | 80 if (iter->id == device_id) |
| 81 return &(*iter); | 81 return &(*iter); |
| 82 } | 82 } |
| 83 return NULL; | 83 return NULL; |
| 84 } | 84 } |
| 85 | 85 |
| 86 MediaStreamDevice::AudioDeviceParameters::AudioDeviceParameters() | |
| 87 : sample_rate(), channel_layout(), frames_per_buffer(), effects() {} | |
| 88 | |
|
jam
2015/09/10 19:24:19
can this be inlined?
ajm
2015/09/10 19:33:04
Both of these are chromium-style violations due to
| |
| 89 MediaStreamDevice::AudioDeviceParameters::AudioDeviceParameters( | |
| 90 int sample_rate, | |
| 91 int channel_layout, | |
| 92 int frames_per_buffer) | |
| 93 : sample_rate(sample_rate), | |
| 94 channel_layout(channel_layout), | |
| 95 frames_per_buffer(frames_per_buffer), | |
| 96 effects() {} | |
| 97 | |
| 98 MediaStreamDevice::AudioDeviceParameters::~AudioDeviceParameters() {} | |
|
aluebs-chromium
2015/09/10 02:41:39
Is there a reason to have an empty destructor here
jam
2015/09/10 19:24:19
also wondering this..
ajm
2015/09/10 19:33:04
As above. I should have added a review comment abo
aluebs-chromium
2015/09/11 01:58:42
Oh, I see. Thank you for clarifying :)
| |
| 99 | |
| 86 MediaStreamRequest::MediaStreamRequest( | 100 MediaStreamRequest::MediaStreamRequest( |
| 87 int render_process_id, | 101 int render_process_id, |
| 88 int render_frame_id, | 102 int render_frame_id, |
| 89 int page_request_id, | 103 int page_request_id, |
| 90 const GURL& security_origin, | 104 const GURL& security_origin, |
| 91 bool user_gesture, | 105 bool user_gesture, |
| 92 MediaStreamRequestType request_type, | 106 MediaStreamRequestType request_type, |
| 93 const std::string& requested_audio_device_id, | 107 const std::string& requested_audio_device_id, |
| 94 const std::string& requested_video_device_id, | 108 const std::string& requested_video_device_id, |
| 95 MediaStreamType audio_type, | 109 MediaStreamType audio_type, |
| 96 MediaStreamType video_type) | 110 MediaStreamType video_type) |
| 97 : render_process_id(render_process_id), | 111 : render_process_id(render_process_id), |
| 98 render_frame_id(render_frame_id), | 112 render_frame_id(render_frame_id), |
| 99 page_request_id(page_request_id), | 113 page_request_id(page_request_id), |
| 100 security_origin(security_origin), | 114 security_origin(security_origin), |
| 101 user_gesture(user_gesture), | 115 user_gesture(user_gesture), |
| 102 request_type(request_type), | 116 request_type(request_type), |
| 103 requested_audio_device_id(requested_audio_device_id), | 117 requested_audio_device_id(requested_audio_device_id), |
| 104 requested_video_device_id(requested_video_device_id), | 118 requested_video_device_id(requested_video_device_id), |
| 105 audio_type(audio_type), | 119 audio_type(audio_type), |
| 106 video_type(video_type), | 120 video_type(video_type), |
| 107 all_ancestors_have_same_origin(false) { | 121 all_ancestors_have_same_origin(false) { |
| 108 } | 122 } |
| 109 | 123 |
| 110 MediaStreamRequest::~MediaStreamRequest() {} | 124 MediaStreamRequest::~MediaStreamRequest() {} |
| 111 | 125 |
| 112 } // namespace content | 126 } // namespace content |
| OLD | NEW |