| 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 702     OnContentAllowed(CONTENT_SETTINGS_TYPE_PPAPI_BROKER); | 702     OnContentAllowed(CONTENT_SETTINGS_TYPE_PPAPI_BROKER); | 
| 703   } else { | 703   } else { | 
| 704     OnContentBlocked(CONTENT_SETTINGS_TYPE_PPAPI_BROKER); | 704     OnContentBlocked(CONTENT_SETTINGS_TYPE_PPAPI_BROKER); | 
| 705   } | 705   } | 
| 706 } | 706 } | 
| 707 | 707 | 
| 708 void TabSpecificContentSettings::OnContentSettingChanged( | 708 void TabSpecificContentSettings::OnContentSettingChanged( | 
| 709     const ContentSettingsPattern& primary_pattern, | 709     const ContentSettingsPattern& primary_pattern, | 
| 710     const ContentSettingsPattern& secondary_pattern, | 710     const ContentSettingsPattern& secondary_pattern, | 
| 711     ContentSettingsType content_type, | 711     ContentSettingsType content_type, | 
|  | 712     ContentSetting previous_value, | 
| 712     std::string resource_identifier) { | 713     std::string resource_identifier) { | 
| 713   const ContentSettingsDetails details( | 714   const ContentSettingsDetails details( | 
| 714       primary_pattern, secondary_pattern, content_type, resource_identifier); | 715       primary_pattern, secondary_pattern, content_type, resource_identifier); | 
| 715   const NavigationController& controller = web_contents()->GetController(); | 716   const NavigationController& controller = web_contents()->GetController(); | 
| 716   NavigationEntry* entry = controller.GetVisibleEntry(); | 717   NavigationEntry* entry = controller.GetVisibleEntry(); | 
| 717   GURL entry_url; | 718   GURL entry_url; | 
| 718   if (entry) | 719   if (entry) | 
| 719     entry_url = entry->GetURL(); | 720     entry_url = entry->GetURL(); | 
| 720   if (details.update_all() || | 721   if (details.update_all() || | 
| 721       // The visible NavigationEntry is the URL in the URL field of a tab. | 722       // The visible NavigationEntry is the URL in the URL field of a tab. | 
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 856       static_cast<MicrophoneCameraStateFlags>( | 857       static_cast<MicrophoneCameraStateFlags>( | 
| 857           TabSpecificContentSettings::MICROPHONE_ACCESSED | | 858           TabSpecificContentSettings::MICROPHONE_ACCESSED | | 
| 858           TabSpecificContentSettings::MICROPHONE_BLOCKED | | 859           TabSpecificContentSettings::MICROPHONE_BLOCKED | | 
| 859           TabSpecificContentSettings::CAMERA_ACCESSED | | 860           TabSpecificContentSettings::CAMERA_ACCESSED | | 
| 860           TabSpecificContentSettings::CAMERA_BLOCKED); | 861           TabSpecificContentSettings::CAMERA_BLOCKED); | 
| 861   OnMediaStreamPermissionSet( | 862   OnMediaStreamPermissionSet( | 
| 862       web_contents()->GetLastCommittedURL(), | 863       web_contents()->GetLastCommittedURL(), | 
| 863       media_blocked, | 864       media_blocked, | 
| 864       std::string(), std::string(), std::string(), std::string()); | 865       std::string(), std::string(), std::string(), std::string()); | 
| 865 } | 866 } | 
| OLD | NEW | 
|---|