| 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 "chrome/browser/media/media_stream_devices_controller.h" | 5 #include "chrome/browser/media/media_stream_devices_controller.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/content_settings/content_settings_provider.h" | 10 #include "chrome/browser/content_settings/content_settings_provider.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 extensions::TabCaptureRegistryFactory::GetForProfile(profile_); | 272 extensions::TabCaptureRegistryFactory::GetForProfile(profile_); |
| 273 | 273 |
| 274 if (!registry->VerifyRequest(request_.render_process_id, | 274 if (!registry->VerifyRequest(request_.render_process_id, |
| 275 request_.render_view_id)) { | 275 request_.render_view_id)) { |
| 276 Deny(false); | 276 Deny(false); |
| 277 } else { | 277 } else { |
| 278 content::MediaStreamDevices devices; | 278 content::MediaStreamDevices devices; |
| 279 | 279 |
| 280 if (request_.audio_type == content::MEDIA_TAB_AUDIO_CAPTURE) { | 280 if (request_.audio_type == content::MEDIA_TAB_AUDIO_CAPTURE) { |
| 281 devices.push_back(content::MediaStreamDevice( | 281 devices.push_back(content::MediaStreamDevice( |
| 282 content::MEDIA_TAB_AUDIO_CAPTURE, "", "")); | 282 content::MEDIA_TAB_AUDIO_CAPTURE, std::string(), std::string())); |
| 283 } | 283 } |
| 284 if (request_.video_type == content::MEDIA_TAB_VIDEO_CAPTURE) { | 284 if (request_.video_type == content::MEDIA_TAB_VIDEO_CAPTURE) { |
| 285 devices.push_back(content::MediaStreamDevice( | 285 devices.push_back(content::MediaStreamDevice( |
| 286 content::MEDIA_TAB_VIDEO_CAPTURE, "", "")); | 286 content::MEDIA_TAB_VIDEO_CAPTURE, std::string(), std::string())); |
| 287 } | 287 } |
| 288 | 288 |
| 289 callback_.Run(devices); | 289 callback_.Run(devices); |
| 290 } | 290 } |
| 291 #endif | 291 #endif |
| 292 } | 292 } |
| 293 | 293 |
| 294 bool MediaStreamDevicesController::IsSchemeSecure() const { | 294 bool MediaStreamDevicesController::IsSchemeSecure() const { |
| 295 return (request_.security_origin.SchemeIsSecure()); | 295 return (request_.security_origin.SchemeIsSecure()); |
| 296 } | 296 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 329 } |
| 330 if (webcam_requested_) { | 330 if (webcam_requested_) { |
| 331 profile_->GetHostContentSettingsMap()->SetContentSetting( | 331 profile_->GetHostContentSettingsMap()->SetContentSetting( |
| 332 primary_pattern, | 332 primary_pattern, |
| 333 ContentSettingsPattern::Wildcard(), | 333 ContentSettingsPattern::Wildcard(), |
| 334 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, | 334 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, |
| 335 std::string(), | 335 std::string(), |
| 336 content_setting); | 336 content_setting); |
| 337 } | 337 } |
| 338 } | 338 } |
| OLD | NEW |