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/content_settings/tab_specific_content_settings.h" | 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 bool TabSpecificContentSettings::IsContentBlocked( | 219 bool TabSpecificContentSettings::IsContentBlocked( |
220 ContentSettingsType content_type) const { | 220 ContentSettingsType content_type) const { |
221 DCHECK(content_type != CONTENT_SETTINGS_TYPE_GEOLOCATION) | 221 DCHECK(content_type != CONTENT_SETTINGS_TYPE_GEOLOCATION) |
222 << "Geolocation settings handled by ContentSettingGeolocationImageModel"; | 222 << "Geolocation settings handled by ContentSettingGeolocationImageModel"; |
223 DCHECK(content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS) | 223 DCHECK(content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS) |
224 << "Notifications settings handled by " | 224 << "Notifications settings handled by " |
225 << "ContentSettingsNotificationsImageModel"; | 225 << "ContentSettingsNotificationsImageModel"; |
226 | 226 |
227 if (content_type == CONTENT_SETTINGS_TYPE_IMAGES || | 227 if (content_type == CONTENT_SETTINGS_TYPE_IMAGES || |
228 content_type == CONTENT_SETTINGS_TYPE_JAVASCRIPT || | 228 content_type == CONTENT_SETTINGS_TYPE_JAVASCRIPT || |
| 229 content_type == CONTENT_SETTINGS_TYPE_MEDIA || |
229 content_type == CONTENT_SETTINGS_TYPE_PLUGINS || | 230 content_type == CONTENT_SETTINGS_TYPE_PLUGINS || |
230 content_type == CONTENT_SETTINGS_TYPE_COOKIES || | 231 content_type == CONTENT_SETTINGS_TYPE_COOKIES || |
231 content_type == CONTENT_SETTINGS_TYPE_POPUPS || | 232 content_type == CONTENT_SETTINGS_TYPE_POPUPS || |
232 content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT || | 233 content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT || |
233 content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM || | 234 content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM || |
234 content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || | 235 content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || |
235 content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA || | 236 content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA || |
236 content_type == CONTENT_SETTINGS_TYPE_PPAPI_BROKER || | 237 content_type == CONTENT_SETTINGS_TYPE_PPAPI_BROKER || |
237 content_type == CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS || | 238 content_type == CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS || |
238 content_type == CONTENT_SETTINGS_TYPE_MIDI_SYSEX) { | 239 content_type == CONTENT_SETTINGS_TYPE_MIDI_SYSEX) { |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 } | 724 } |
724 | 725 |
725 void TabSpecificContentSettings::RemoveSiteDataObserver( | 726 void TabSpecificContentSettings::RemoveSiteDataObserver( |
726 SiteDataObserver* observer) { | 727 SiteDataObserver* observer) { |
727 observer_list_.RemoveObserver(observer); | 728 observer_list_.RemoveObserver(observer); |
728 } | 729 } |
729 | 730 |
730 void TabSpecificContentSettings::NotifySiteDataObservers() { | 731 void TabSpecificContentSettings::NotifySiteDataObservers() { |
731 FOR_EACH_OBSERVER(SiteDataObserver, observer_list_, OnSiteDataAccessed()); | 732 FOR_EACH_OBSERVER(SiteDataObserver, observer_list_, OnSiteDataAccessed()); |
732 } | 733 } |
OLD | NEW |