| 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_capture_devices_dispatcher.h" | 5 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/sha1.h" | 10 #include "base/sha1.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 is_device_enumeration_disabled_(false), | 103 is_device_enumeration_disabled_(false), |
| 104 media_stream_capture_indicator_(new MediaStreamCaptureIndicator()), | 104 media_stream_capture_indicator_(new MediaStreamCaptureIndicator()), |
| 105 audio_stream_indicator_(new AudioStreamIndicator()) { | 105 audio_stream_indicator_(new AudioStreamIndicator()) { |
| 106 notifications_registrar_.Add( | 106 notifications_registrar_.Add( |
| 107 this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED, | 107 this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED, |
| 108 content::NotificationService::AllSources()); | 108 content::NotificationService::AllSources()); |
| 109 } | 109 } |
| 110 | 110 |
| 111 MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {} | 111 MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {} |
| 112 | 112 |
| 113 void MediaCaptureDevicesDispatcher::RegisterUserPrefs( | 113 void MediaCaptureDevicesDispatcher::RegisterProfilePrefs( |
| 114 user_prefs::PrefRegistrySyncable* registry) { | 114 user_prefs::PrefRegistrySyncable* registry) { |
| 115 registry->RegisterStringPref( | 115 registry->RegisterStringPref( |
| 116 prefs::kDefaultAudioCaptureDevice, | 116 prefs::kDefaultAudioCaptureDevice, |
| 117 std::string(), | 117 std::string(), |
| 118 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 118 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 119 registry->RegisterStringPref( | 119 registry->RegisterStringPref( |
| 120 prefs::kDefaultVideoCaptureDevice, | 120 prefs::kDefaultVideoCaptureDevice, |
| 121 std::string(), | 121 std::string(), |
| 122 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 122 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 123 } | 123 } |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 int render_process_id, | 472 int render_process_id, |
| 473 int render_view_id, | 473 int render_view_id, |
| 474 const content::MediaStreamDevice& device, | 474 const content::MediaStreamDevice& device, |
| 475 content::MediaRequestState state) { | 475 content::MediaRequestState state) { |
| 476 FOR_EACH_OBSERVER(Observer, observers_, | 476 FOR_EACH_OBSERVER(Observer, observers_, |
| 477 OnRequestUpdate(render_process_id, | 477 OnRequestUpdate(render_process_id, |
| 478 render_view_id, | 478 render_view_id, |
| 479 device, | 479 device, |
| 480 state)); | 480 state)); |
| 481 } | 481 } |
| OLD | NEW |