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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 | 181 |
182 // Returns whether a particular kind of content has been blocked for this | 182 // Returns whether a particular kind of content has been blocked for this |
183 // page. | 183 // page. |
184 bool IsContentBlocked(ContentSettingsType content_type) const; | 184 bool IsContentBlocked(ContentSettingsType content_type) const; |
185 | 185 |
186 // Returns true if content blockage was indicated to the user. | 186 // Returns true if content blockage was indicated to the user. |
187 bool IsBlockageIndicated(ContentSettingsType content_type) const; | 187 bool IsBlockageIndicated(ContentSettingsType content_type) const; |
188 | 188 |
189 void SetBlockageHasBeenIndicated(ContentSettingsType content_type); | 189 void SetBlockageHasBeenIndicated(ContentSettingsType content_type); |
190 | 190 |
191 void SetSubresourceBlockageIndicated() { | |
msramek
2016/07/27 09:46:21
Please define in this in the .cc file like above.
melandory
2016/07/27 12:53:40
Done.
| |
192 is_subresource_filter_blockage_indicated_ = true; | |
193 } | |
194 | |
191 // Returns whether a particular kind of content has been allowed. Currently | 195 // Returns whether a particular kind of content has been allowed. Currently |
192 // only tracks cookies. | 196 // only tracks cookies. |
193 bool IsContentAllowed(ContentSettingsType content_type) const; | 197 bool IsContentAllowed(ContentSettingsType content_type) const; |
194 | 198 |
195 // Returns the names of plugins that have been blocked for this tab. | 199 // Returns the names of plugins that have been blocked for this tab. |
196 const std::vector<base::string16>& blocked_plugin_names() const { | 200 const std::vector<base::string16>& blocked_plugin_names() const { |
197 return blocked_plugin_names_; | 201 return blocked_plugin_names_; |
198 } | 202 } |
199 | 203 |
200 const GURL& media_stream_access_origin() const { | 204 const GURL& media_stream_access_origin() const { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 const ContentSettingsUsagesState& geolocation_usages_state() const { | 237 const ContentSettingsUsagesState& geolocation_usages_state() const { |
234 return geolocation_usages_state_; | 238 return geolocation_usages_state_; |
235 } | 239 } |
236 | 240 |
237 // Returns the ContentSettingsUsageState that controls the MIDI usage on | 241 // Returns the ContentSettingsUsageState that controls the MIDI usage on |
238 // this page. | 242 // this page. |
239 const ContentSettingsUsagesState& midi_usages_state() const { | 243 const ContentSettingsUsagesState& midi_usages_state() const { |
240 return midi_usages_state_; | 244 return midi_usages_state_; |
241 } | 245 } |
242 | 246 |
247 bool is_subresource_filter_enabled() const { | |
msramek
2016/07/27 09:46:21
Please make it more obvious that this supplements
melandory
2016/07/27 12:53:40
Done.
| |
248 return is_subresource_filter_enabled_; | |
249 } | |
250 | |
251 void set_is_subresource_filter_enabled(bool enabled) { | |
msramek
2016/07/27 09:46:21
Please make this consistent with SetDownloadsBlock
melandory
2016/07/27 12:53:40
Done.
| |
252 is_subresource_filter_enabled_ = enabled; | |
253 } | |
254 | |
243 // Call to indicate that there is a protocol handler pending user approval. | 255 // Call to indicate that there is a protocol handler pending user approval. |
244 void set_pending_protocol_handler(const ProtocolHandler& handler) { | 256 void set_pending_protocol_handler(const ProtocolHandler& handler) { |
245 pending_protocol_handler_ = handler; | 257 pending_protocol_handler_ = handler; |
246 } | 258 } |
247 | 259 |
248 const ProtocolHandler& pending_protocol_handler() const { | 260 const ProtocolHandler& pending_protocol_handler() const { |
249 return pending_protocol_handler_; | 261 return pending_protocol_handler_; |
250 } | 262 } |
251 | 263 |
252 void ClearPendingProtocolHandler() { | 264 void ClearPendingProtocolHandler() { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
460 MicrophoneCameraState microphone_camera_state_; | 472 MicrophoneCameraState microphone_camera_state_; |
461 // The selected devices at the last media stream request. | 473 // The selected devices at the last media stream request. |
462 std::string media_stream_selected_audio_device_; | 474 std::string media_stream_selected_audio_device_; |
463 std::string media_stream_selected_video_device_; | 475 std::string media_stream_selected_video_device_; |
464 | 476 |
465 // The devices to be displayed in the media bubble when the media stream | 477 // The devices to be displayed in the media bubble when the media stream |
466 // request is requesting certain specific devices. | 478 // request is requesting certain specific devices. |
467 std::string media_stream_requested_audio_device_; | 479 std::string media_stream_requested_audio_device_; |
468 std::string media_stream_requested_video_device_; | 480 std::string media_stream_requested_video_device_; |
469 | 481 |
482 // Manages information about Subresource filtering activation. | |
483 bool is_subresource_filter_enabled_; | |
msramek
2016/07/27 09:46:21
nit: the "is" seems superfluous
melandory
2016/07/27 12:53:40
Done.
| |
484 bool is_subresource_filter_blockage_indicated_; | |
485 | |
470 // Observer to watch for content settings changed. | 486 // Observer to watch for content settings changed. |
471 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; | 487 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |
472 | 488 |
473 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 489 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
474 }; | 490 }; |
475 | 491 |
476 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 492 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
OLD | NEW |