| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 CONTENT_SETTINGS_TYPE_GEOLOCATION), | 96 CONTENT_SETTINGS_TYPE_GEOLOCATION), |
| 97 midi_usages_state_( | 97 midi_usages_state_( |
| 98 HostContentSettingsMapFactory::GetForProfile( | 98 HostContentSettingsMapFactory::GetForProfile( |
| 99 Profile::FromBrowserContext(tab->GetBrowserContext())), | 99 Profile::FromBrowserContext(tab->GetBrowserContext())), |
| 100 CONTENT_SETTINGS_TYPE_MIDI_SYSEX), | 100 CONTENT_SETTINGS_TYPE_MIDI_SYSEX), |
| 101 pending_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), | 101 pending_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), |
| 102 previous_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), | 102 previous_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), |
| 103 pending_protocol_handler_setting_(CONTENT_SETTING_DEFAULT), | 103 pending_protocol_handler_setting_(CONTENT_SETTING_DEFAULT), |
| 104 load_plugins_link_enabled_(true), | 104 load_plugins_link_enabled_(true), |
| 105 microphone_camera_state_(MICROPHONE_CAMERA_NOT_ACCESSED), | 105 microphone_camera_state_(MICROPHONE_CAMERA_NOT_ACCESSED), |
| 106 is_subresource_filter_enabled_(false), |
| 107 is_subresource_filter_blockage_indicated_(false), |
| 106 observer_(this) { | 108 observer_(this) { |
| 107 ClearBlockedContentSettingsExceptForCookies(); | 109 ClearBlockedContentSettingsExceptForCookies(); |
| 108 ClearCookieSpecificContentSettings(); | 110 ClearCookieSpecificContentSettings(); |
| 109 | 111 |
| 110 observer_.Add(HostContentSettingsMapFactory::GetForProfile( | 112 observer_.Add(HostContentSettingsMapFactory::GetForProfile( |
| 111 Profile::FromBrowserContext(tab->GetBrowserContext()))); | 113 Profile::FromBrowserContext(tab->GetBrowserContext()))); |
| 112 } | 114 } |
| 113 | 115 |
| 114 TabSpecificContentSettings::~TabSpecificContentSettings() { | 116 TabSpecificContentSettings::~TabSpecificContentSettings() { |
| 115 FOR_EACH_OBSERVER( | 117 FOR_EACH_OBSERVER( |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 static_cast<MicrophoneCameraStateFlags>( | 851 static_cast<MicrophoneCameraStateFlags>( |
| 850 TabSpecificContentSettings::MICROPHONE_ACCESSED | | 852 TabSpecificContentSettings::MICROPHONE_ACCESSED | |
| 851 TabSpecificContentSettings::MICROPHONE_BLOCKED | | 853 TabSpecificContentSettings::MICROPHONE_BLOCKED | |
| 852 TabSpecificContentSettings::CAMERA_ACCESSED | | 854 TabSpecificContentSettings::CAMERA_ACCESSED | |
| 853 TabSpecificContentSettings::CAMERA_BLOCKED); | 855 TabSpecificContentSettings::CAMERA_BLOCKED); |
| 854 OnMediaStreamPermissionSet( | 856 OnMediaStreamPermissionSet( |
| 855 web_contents()->GetLastCommittedURL(), | 857 web_contents()->GetLastCommittedURL(), |
| 856 media_blocked, | 858 media_blocked, |
| 857 std::string(), std::string(), std::string(), std::string()); | 859 std::string(), std::string(), std::string(), std::string()); |
| 858 } | 860 } |
| OLD | NEW |