| 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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 ContentSetting setting = map->GetContentSetting(media_origin, | 753 ContentSetting setting = map->GetContentSetting(media_origin, |
| 754 media_origin, | 754 media_origin, |
| 755 content_type, | 755 content_type, |
| 756 std::string()); | 756 std::string()); |
| 757 ContentSettingsStatus& status = content_settings_status_[content_type]; | 757 ContentSettingsStatus& status = content_settings_status_[content_type]; |
| 758 status.allowed = setting == CONTENT_SETTING_ALLOW; | 758 status.allowed = setting == CONTENT_SETTING_ALLOW; |
| 759 status.blocked = setting == CONTENT_SETTING_BLOCK; | 759 status.blocked = setting == CONTENT_SETTING_BLOCK; |
| 760 } | 760 } |
| 761 RendererContentSettingRules rules; | 761 RendererContentSettingRules rules; |
| 762 GetRendererContentSettingRules(map, &rules); | 762 GetRendererContentSettingRules(map, &rules); |
| 763 // TODO(nigeltao): use Mojo instead of legacy IPC. |
| 763 Send(new ChromeViewMsg_SetContentSettingRules(rules)); | 764 Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
| 764 } | 765 } |
| 765 } | 766 } |
| 766 | 767 |
| 767 void TabSpecificContentSettings::RenderFrameForInterstitialPageCreated( | 768 void TabSpecificContentSettings::RenderFrameForInterstitialPageCreated( |
| 768 content::RenderFrameHost* render_frame_host) { | 769 content::RenderFrameHost* render_frame_host) { |
| 769 // We want to tell the renderer-side code to ignore content settings for this | 770 // We want to tell the renderer-side code to ignore content settings for this |
| 770 // page. | 771 // page. |
| 771 render_frame_host->Send(new ChromeViewMsg_SetAsInterstitial( | 772 render_frame_host->Send(new ChromeViewMsg_SetAsInterstitial( |
| 772 render_frame_host->GetRoutingID())); | 773 render_frame_host->GetRoutingID())); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 static_cast<MicrophoneCameraStateFlags>( | 897 static_cast<MicrophoneCameraStateFlags>( |
| 897 TabSpecificContentSettings::MICROPHONE_ACCESSED | | 898 TabSpecificContentSettings::MICROPHONE_ACCESSED | |
| 898 TabSpecificContentSettings::MICROPHONE_BLOCKED | | 899 TabSpecificContentSettings::MICROPHONE_BLOCKED | |
| 899 TabSpecificContentSettings::CAMERA_ACCESSED | | 900 TabSpecificContentSettings::CAMERA_ACCESSED | |
| 900 TabSpecificContentSettings::CAMERA_BLOCKED); | 901 TabSpecificContentSettings::CAMERA_BLOCKED); |
| 901 OnMediaStreamPermissionSet( | 902 OnMediaStreamPermissionSet( |
| 902 web_contents()->GetLastCommittedURL(), | 903 web_contents()->GetLastCommittedURL(), |
| 903 media_blocked, | 904 media_blocked, |
| 904 std::string(), std::string(), std::string(), std::string()); | 905 std::string(), std::string(), std::string(), std::string()); |
| 905 } | 906 } |
| OLD | NEW |