| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 TabSpecificContentSettings::TabSpecificContentSettings(WebContents* tab) | 62 TabSpecificContentSettings::TabSpecificContentSettings(WebContents* tab) |
| 63 : content::WebContentsObserver(tab), | 63 : content::WebContentsObserver(tab), |
| 64 profile_(Profile::FromBrowserContext(tab->GetBrowserContext())), | 64 profile_(Profile::FromBrowserContext(tab->GetBrowserContext())), |
| 65 allowed_local_shared_objects_(profile_), | 65 allowed_local_shared_objects_(profile_), |
| 66 blocked_local_shared_objects_(profile_), | 66 blocked_local_shared_objects_(profile_), |
| 67 geolocation_usages_state_(profile_, CONTENT_SETTINGS_TYPE_GEOLOCATION), | 67 geolocation_usages_state_(profile_, CONTENT_SETTINGS_TYPE_GEOLOCATION), |
| 68 midi_usages_state_(profile_, CONTENT_SETTINGS_TYPE_MIDI_SYSEX), | 68 midi_usages_state_(profile_, CONTENT_SETTINGS_TYPE_MIDI_SYSEX), |
| 69 pending_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), | 69 pending_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), |
| 70 previous_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), | 70 previous_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), |
| 71 pending_protocol_handler_setting_(CONTENT_SETTING_DEFAULT), | 71 pending_protocol_handler_setting_(CONTENT_SETTING_DEFAULT), |
| 72 plugin_bubble_setting_(CONTENT_SETTING_BLOCK), |
| 72 load_plugins_link_enabled_(true) { | 73 load_plugins_link_enabled_(true) { |
| 73 ClearBlockedContentSettingsExceptForCookies(); | 74 ClearBlockedContentSettingsExceptForCookies(); |
| 74 ClearCookieSpecificContentSettings(); | 75 ClearCookieSpecificContentSettings(); |
| 75 | 76 |
| 76 registrar_.Add(this, chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED, | 77 registrar_.Add(this, chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED, |
| 77 content::Source<HostContentSettingsMap>( | 78 content::Source<HostContentSettingsMap>( |
| 78 profile_->GetHostContentSettingsMap())); | 79 profile_->GetHostContentSettingsMap())); |
| 79 } | 80 } |
| 80 | 81 |
| 81 TabSpecificContentSettings::~TabSpecificContentSettings() { | 82 TabSpecificContentSettings::~TabSpecificContentSettings() { |
| (...skipping 641 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 |