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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // content::NOTIFICATION_WEB_CONTENTS_DESTROYED, and that will result in | 108 // content::NOTIFICATION_WEB_CONTENTS_DESTROYED, and that will result in |
109 // possible use after free. | 109 // possible use after free. |
110 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 110 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
111 notifications_registrar_.Add( | 111 notifications_registrar_.Add( |
112 this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED, | 112 this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED, |
113 content::NotificationService::AllSources()); | 113 content::NotificationService::AllSources()); |
114 } | 114 } |
115 | 115 |
116 MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {} | 116 MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {} |
117 | 117 |
118 void MediaCaptureDevicesDispatcher::RegisterUserPrefs( | 118 void MediaCaptureDevicesDispatcher::RegisterProfilePrefs( |
119 user_prefs::PrefRegistrySyncable* registry) { | 119 user_prefs::PrefRegistrySyncable* registry) { |
120 registry->RegisterStringPref( | 120 registry->RegisterStringPref( |
121 prefs::kDefaultAudioCaptureDevice, | 121 prefs::kDefaultAudioCaptureDevice, |
122 std::string(), | 122 std::string(), |
123 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 123 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
124 registry->RegisterStringPref( | 124 registry->RegisterStringPref( |
125 prefs::kDefaultVideoCaptureDevice, | 125 prefs::kDefaultVideoCaptureDevice, |
126 std::string(), | 126 std::string(), |
127 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 127 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
128 } | 128 } |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 int render_process_id, | 477 int render_process_id, |
478 int render_view_id, | 478 int render_view_id, |
479 const content::MediaStreamDevice& device, | 479 const content::MediaStreamDevice& device, |
480 content::MediaRequestState state) { | 480 content::MediaRequestState state) { |
481 FOR_EACH_OBSERVER(Observer, observers_, | 481 FOR_EACH_OBSERVER(Observer, observers_, |
482 OnRequestUpdate(render_process_id, | 482 OnRequestUpdate(render_process_id, |
483 render_view_id, | 483 render_view_id, |
484 device, | 484 device, |
485 state)); | 485 state)); |
486 } | 486 } |
OLD | NEW |