Index: chrome/browser/content_settings/tab_specific_content_settings.h |
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h |
index dc20cd102122327bfc9bba8173c947eaabe916de..0c8cdbf545e960dde312fb016eaf1fcb592e246e 100644 |
--- a/chrome/browser/content_settings/tab_specific_content_settings.h |
+++ b/chrome/browser/content_settings/tab_specific_content_settings.h |
@@ -37,6 +37,13 @@ namespace net { |
class CookieOptions; |
} |
+// TODO(msramek): Subresource filter and media currently are storing their state |
+// in TabSpecificContentSettings: |microphone_camera_state_| and |
+// |subresource_filter_enabled_| without being tight either to a single content |
msramek
2016/07/27 13:28:26
nit: tied
melandory
2016/07/27 15:05:49
Done.
|
+// setting or to any content setting. This state is not ideal, potential |
+// solution is to use a map<WebContents*, bool> in the |
+// ContentSettingMediaImageModel. |
+ |
// This class manages state about permissions, content settings, cookies and |
// site data for a specific WebContents. It tracks which content was accessed |
// and which content was blocked. Based on this it provides information about |
@@ -188,6 +195,10 @@ class TabSpecificContentSettings |
void SetBlockageHasBeenIndicated(ContentSettingsType content_type); |
+ void SetSubresourceFilteringActivationIndicated(); |
msramek
2016/07/27 13:28:27
Why the renaming to "FilteringActivation"? Since t
melandory
2016/07/27 15:05:48
Done.
|
+ |
+ bool IsSubresourceFilteringActivationIndicated() const; |
+ |
// Returns whether a particular kind of content has been allowed. Currently |
// only tracks cookies. |
bool IsContentAllowed(ContentSettingsType content_type) const; |
@@ -240,6 +251,12 @@ class TabSpecificContentSettings |
return midi_usages_state_; |
} |
+ bool IsSubresourceBlocked() const { return subresource_filter_enabled_; } |
msramek
2016/07/27 13:28:26
AFAIU, in general a method can be inlined in .cc f
melandory
2016/07/27 15:05:49
Done
|
+ |
+ void SetSubresourceFilterEnabledd(bool enabled) { |
msramek
2016/07/27 13:28:27
typo: Enabled (single "d")
melandory
2016/07/27 15:05:48
Done.
|
+ subresource_filter_enabled_ = enabled; |
+ } |
+ |
// Call to indicate that there is a protocol handler pending user approval. |
void set_pending_protocol_handler(const ProtocolHandler& handler) { |
pending_protocol_handler_ = handler; |
@@ -467,6 +484,10 @@ class TabSpecificContentSettings |
std::string media_stream_requested_audio_device_; |
std::string media_stream_requested_video_device_; |
+ // Manages information about Subresource filtering activation. |
+ bool subresource_filter_enabled_; |
+ bool subresource_filter_blockage_indicated_; |
+ |
// Observer to watch for content settings changed. |
ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |