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 COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_H_ | 5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_H_ |
6 #define COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_H_ | 6 #define COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_H_ |
7 | 7 |
8 #include "components/subresource_filter/content/browser/verified_ruleset_dealer.
h" | 8 #include "components/subresource_filter/content/browser/verified_ruleset_dealer.
h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 // Called when the activation decision is otherwise completely computed by the | 31 // Called when the activation decision is otherwise completely computed by the |
32 // subresource filter. At this point, the embedder still has a chance to | 32 // subresource filter. At this point, the embedder still has a chance to |
33 // return false to suppress the activation. Returns whether the activation | 33 // return false to suppress the activation. Returns whether the activation |
34 // should be whitelisted for this navigation. | 34 // should be whitelisted for this navigation. |
35 // | 35 // |
36 // Precondition: The navigation must be a main frame navigation. | 36 // Precondition: The navigation must be a main frame navigation. |
37 virtual bool OnPageActivationComputed( | 37 virtual bool OnPageActivationComputed( |
38 content::NavigationHandle* navigation_handle, | 38 content::NavigationHandle* navigation_handle, |
39 bool activated) = 0; | 39 bool activated) = 0; |
40 | 40 |
41 // Adds |top_level_url| to the BLOCKED state via content settings for the | |
42 // current profile. | |
43 virtual void WhitelistByContentSettings(const GURL& top_level_url) = 0; | |
44 | |
45 // Adds |url| to a per-WebContents whitelist. | 41 // Adds |url| to a per-WebContents whitelist. |
46 virtual void WhitelistInCurrentWebContents(const GURL& url) = 0; | 42 virtual void WhitelistInCurrentWebContents(const GURL& url) = 0; |
47 | 43 |
48 virtual VerifiedRulesetDealer::Handle* GetRulesetDealer() = 0; | 44 virtual VerifiedRulesetDealer::Handle* GetRulesetDealer() = 0; |
49 }; | 45 }; |
50 | 46 |
51 } // namespace subresource_filter | 47 } // namespace subresource_filter |
52 | 48 |
53 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_
H_ | 49 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_
H_ |
OLD | NEW |