| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 MediaStreamDevicesController::~MediaStreamDevicesController() { | 90 MediaStreamDevicesController::~MediaStreamDevicesController() { |
| 91 if (!callback_.is_null()) { | 91 if (!callback_.is_null()) { |
| 92 callback_.Run(content::MediaStreamDevices(), | 92 callback_.Run(content::MediaStreamDevices(), |
| 93 scoped_ptr<content::MediaStreamUI>()); | 93 scoped_ptr<content::MediaStreamUI>()); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 // static | 97 // static |
| 98 void MediaStreamDevicesController::RegisterUserPrefs( | 98 void MediaStreamDevicesController::RegisterProfilePrefs( |
| 99 user_prefs::PrefRegistrySyncable* prefs) { | 99 user_prefs::PrefRegistrySyncable* prefs) { |
| 100 prefs->RegisterBooleanPref(prefs::kVideoCaptureAllowed, | 100 prefs->RegisterBooleanPref(prefs::kVideoCaptureAllowed, |
| 101 true, | 101 true, |
| 102 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 102 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 103 prefs->RegisterBooleanPref(prefs::kAudioCaptureAllowed, | 103 prefs->RegisterBooleanPref(prefs::kAudioCaptureAllowed, |
| 104 true, | 104 true, |
| 105 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 105 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 106 prefs->RegisterListPref(prefs::kVideoCaptureAllowedUrls, | 106 prefs->RegisterListPref(prefs::kVideoCaptureAllowedUrls, |
| 107 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 107 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 108 prefs->RegisterListPref(prefs::kAudioCaptureAllowedUrls, | 108 prefs->RegisterListPref(prefs::kAudioCaptureAllowedUrls, |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 if (request_.audio_type == content::MEDIA_TAB_AUDIO_CAPTURE || | 425 if (request_.audio_type == content::MEDIA_TAB_AUDIO_CAPTURE || |
| 426 request_.video_type == content::MEDIA_TAB_VIDEO_CAPTURE) { | 426 request_.video_type == content::MEDIA_TAB_VIDEO_CAPTURE) { |
| 427 return; | 427 return; |
| 428 } | 428 } |
| 429 | 429 |
| 430 if (request_.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE) | 430 if (request_.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE) |
| 431 content_settings_->OnMicrophoneAccessBlocked(); | 431 content_settings_->OnMicrophoneAccessBlocked(); |
| 432 if (request_.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE) | 432 if (request_.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE) |
| 433 content_settings_->OnCameraAccessBlocked(); | 433 content_settings_->OnCameraAccessBlocked(); |
| 434 } | 434 } |
| OLD | NEW |