| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // CONTENT_SETTINGS_TYPE_JAVASCRIPT). | 182 // CONTENT_SETTINGS_TYPE_JAVASCRIPT). |
| 183 // TODO(vabr): Only public for tests. Move to a test client. | 183 // TODO(vabr): Only public for tests. Move to a test client. |
| 184 void ClearNavigationRelatedContentSettings(); | 184 void ClearNavigationRelatedContentSettings(); |
| 185 | 185 |
| 186 // Notifies that a Flash download has been blocked. | 186 // Notifies that a Flash download has been blocked. |
| 187 void FlashDownloadBlocked(); | 187 void FlashDownloadBlocked(); |
| 188 | 188 |
| 189 // Changes the |content_blocked_| entry for popups. | 189 // Changes the |content_blocked_| entry for popups. |
| 190 void SetPopupsBlocked(bool blocked); | 190 void SetPopupsBlocked(bool blocked); |
| 191 | 191 |
| 192 // Changes the |content_blocked_| entry for downloads. | |
| 193 void SetDownloadsBlocked(bool blocked); | |
| 194 | |
| 195 // Changes |subresource_filter_enabled_| entry for the Safe Browsing | 192 // Changes |subresource_filter_enabled_| entry for the Safe Browsing |
| 196 // Subresource Filter. | 193 // Subresource Filter. |
| 197 void SetSubresourceBlocked(bool enabled); | 194 void SetSubresourceBlocked(bool enabled); |
| 198 | 195 |
| 199 // Returns whether a particular kind of content has been blocked for this | 196 // Returns whether a particular kind of content has been blocked for this |
| 200 // page. | 197 // page. |
| 201 bool IsContentBlocked(ContentSettingsType content_type) const; | 198 bool IsContentBlocked(ContentSettingsType content_type) const; |
| 202 | 199 |
| 203 // Returns true if Safe Browsing Subresource Filter is active for the page. | 200 // Returns true if Safe Browsing Subresource Filter is active for the page. |
| 204 // TODO(melandory): revisit this method if/once content setting will be added. | 201 // TODO(melandory): revisit this method if/once content setting will be added. |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 // Holds the previous committed url during a navigation. | 486 // Holds the previous committed url during a navigation. |
| 490 GURL previous_url_; | 487 GURL previous_url_; |
| 491 | 488 |
| 492 // Observer to watch for content settings changed. | 489 // Observer to watch for content settings changed. |
| 493 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; | 490 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |
| 494 | 491 |
| 495 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 492 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
| 496 }; | 493 }; |
| 497 | 494 |
| 498 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 495 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| OLD | NEW |