| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 TabSpecificContentSettings::TabSpecificContentSettings(WebContents* tab) | 87 TabSpecificContentSettings::TabSpecificContentSettings(WebContents* tab) |
| 88 : content::WebContentsObserver(tab), | 88 : content::WebContentsObserver(tab), |
| 89 allowed_local_shared_objects_( | 89 allowed_local_shared_objects_( |
| 90 Profile::FromBrowserContext(tab->GetBrowserContext())), | 90 Profile::FromBrowserContext(tab->GetBrowserContext())), |
| 91 blocked_local_shared_objects_( | 91 blocked_local_shared_objects_( |
| 92 Profile::FromBrowserContext(tab->GetBrowserContext())), | 92 Profile::FromBrowserContext(tab->GetBrowserContext())), |
| 93 geolocation_usages_state_( | 93 geolocation_usages_state_( |
| 94 HostContentSettingsMapFactory::GetForProfile( | 94 HostContentSettingsMapFactory::GetForProfile( |
| 95 Profile::FromBrowserContext(tab->GetBrowserContext())), | 95 Profile::FromBrowserContext(tab->GetBrowserContext())), |
| 96 CONTENT_SETTINGS_TYPE_GEOLOCATION, | 96 CONTENT_SETTINGS_TYPE_GEOLOCATION), |
| 97 prefs::kAcceptLanguages, | |
| 98 Profile::FromBrowserContext(tab->GetBrowserContext())->GetPrefs()), | |
| 99 midi_usages_state_( | 97 midi_usages_state_( |
| 100 HostContentSettingsMapFactory::GetForProfile( | 98 HostContentSettingsMapFactory::GetForProfile( |
| 101 Profile::FromBrowserContext(tab->GetBrowserContext())), | 99 Profile::FromBrowserContext(tab->GetBrowserContext())), |
| 102 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, | 100 CONTENT_SETTINGS_TYPE_MIDI_SYSEX), |
| 103 prefs::kAcceptLanguages, | |
| 104 Profile::FromBrowserContext(tab->GetBrowserContext())->GetPrefs()), | |
| 105 pending_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), | 101 pending_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), |
| 106 previous_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), | 102 previous_protocol_handler_(ProtocolHandler::EmptyProtocolHandler()), |
| 107 pending_protocol_handler_setting_(CONTENT_SETTING_DEFAULT), | 103 pending_protocol_handler_setting_(CONTENT_SETTING_DEFAULT), |
| 108 load_plugins_link_enabled_(true), | 104 load_plugins_link_enabled_(true), |
| 109 microphone_camera_state_(MICROPHONE_CAMERA_NOT_ACCESSED), | 105 microphone_camera_state_(MICROPHONE_CAMERA_NOT_ACCESSED), |
| 110 observer_(this) { | 106 observer_(this) { |
| 111 ClearBlockedContentSettingsExceptForCookies(); | 107 ClearBlockedContentSettingsExceptForCookies(); |
| 112 ClearCookieSpecificContentSettings(); | 108 ClearCookieSpecificContentSettings(); |
| 113 | 109 |
| 114 observer_.Add(HostContentSettingsMapFactory::GetForProfile( | 110 observer_.Add(HostContentSettingsMapFactory::GetForProfile( |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 static_cast<MicrophoneCameraStateFlags>( | 852 static_cast<MicrophoneCameraStateFlags>( |
| 857 TabSpecificContentSettings::MICROPHONE_ACCESSED | | 853 TabSpecificContentSettings::MICROPHONE_ACCESSED | |
| 858 TabSpecificContentSettings::MICROPHONE_BLOCKED | | 854 TabSpecificContentSettings::MICROPHONE_BLOCKED | |
| 859 TabSpecificContentSettings::CAMERA_ACCESSED | | 855 TabSpecificContentSettings::CAMERA_ACCESSED | |
| 860 TabSpecificContentSettings::CAMERA_BLOCKED); | 856 TabSpecificContentSettings::CAMERA_BLOCKED); |
| 861 OnMediaStreamPermissionSet( | 857 OnMediaStreamPermissionSet( |
| 862 web_contents()->GetLastCommittedURL(), | 858 web_contents()->GetLastCommittedURL(), |
| 863 media_blocked, | 859 media_blocked, |
| 864 std::string(), std::string(), std::string(), std::string()); | 860 std::string(), std::string(), std::string(), std::string()); |
| 865 } | 861 } |
| OLD | NEW |