OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SUBRESOURCE_FILTER_CHROME_SUBRESOURCE_FILTER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_SUBRESOURCE_FILTER_CHROME_SUBRESOURCE_FILTER_CLIENT_H_ |
6 #define CHROME_BROWSER_SUBRESOURCE_FILTER_CHROME_SUBRESOURCE_FILTER_CLIENT_H_ | 6 #define CHROME_BROWSER_SUBRESOURCE_FILTER_CHROME_SUBRESOURCE_FILTER_CLIENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // SubresourceFilterClient: | 70 // SubresourceFilterClient: |
71 void ToggleNotificationVisibility(bool visibility) override; | 71 void ToggleNotificationVisibility(bool visibility) override; |
72 bool ShouldSuppressActivation( | 72 bool ShouldSuppressActivation( |
73 content::NavigationHandle* navigation_handle) override; | 73 content::NavigationHandle* navigation_handle) override; |
74 void WhitelistByContentSettings(const GURL& url) override; | 74 void WhitelistByContentSettings(const GURL& url) override; |
75 void WhitelistInCurrentWebContents(const GURL& url) override; | 75 void WhitelistInCurrentWebContents(const GURL& url) override; |
76 subresource_filter::VerifiedRulesetDealer::Handle* GetRulesetDealer() | 76 subresource_filter::VerifiedRulesetDealer::Handle* GetRulesetDealer() |
77 override; | 77 override; |
78 | 78 |
| 79 bool did_show_ui_for_navigation() const { |
| 80 return did_show_ui_for_navigation_; |
| 81 } |
| 82 |
79 static void LogAction(SubresourceFilterAction action); | 83 static void LogAction(SubresourceFilterAction action); |
80 | 84 |
81 private: | 85 private: |
82 ContentSetting GetContentSettingForUrl(const GURL& url); | 86 ContentSetting GetContentSettingForUrl(const GURL& url); |
83 std::set<std::string> whitelisted_hosts_; | 87 std::set<std::string> whitelisted_hosts_; |
84 content::WebContents* web_contents_; | 88 content::WebContents* web_contents_; |
85 bool shown_for_navigation_; | 89 bool did_show_ui_for_navigation_; |
86 | 90 |
87 DISALLOW_COPY_AND_ASSIGN(ChromeSubresourceFilterClient); | 91 DISALLOW_COPY_AND_ASSIGN(ChromeSubresourceFilterClient); |
88 }; | 92 }; |
89 | 93 |
90 #endif // CHROME_BROWSER_SUBRESOURCE_FILTER_CHROME_SUBRESOURCE_FILTER_CLIENT_H_ | 94 #endif // CHROME_BROWSER_SUBRESOURCE_FILTER_CHROME_SUBRESOURCE_FILTER_CLIENT_H_ |
OLD | NEW |