Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: components/subresource_filter/content/browser/subresource_filter_client.h

Issue 2874663002: [subresource_filter] s/ShouldSuppressActivation/OnPageActivationComputed (Closed)
Patch Set: count() Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 virtual ~SubresourceFilterClient() = default; 21 virtual ~SubresourceFilterClient() = default;
22 22
23 // Changes the visibility of the prompt that informs the user that potentially 23 // Changes the visibility of the prompt that informs the user that potentially
24 // deceptive content has been blocked on the page according to the passed 24 // deceptive content has been blocked on the page according to the passed
25 // |visibility| parameter. When |visibility| is set to true, an icon on the 25 // |visibility| parameter. When |visibility| is set to true, an icon on the
26 // right side of the omnibox is displayed. If the user clicks on the icon then 26 // right side of the omnibox is displayed. If the user clicks on the icon then
27 // a bubble is shown that explains the feature and alalows the user to turn it 27 // a bubble is shown that explains the feature and alalows the user to turn it
28 // off. 28 // off.
29 virtual void ToggleNotificationVisibility(bool visibility) = 0; 29 virtual void ToggleNotificationVisibility(bool visibility) = 0;
30 30
31 // Returns true if the navigation is in a main frame and the URL is 31 // Called when the activation decision is otherwise completely computed by the
32 // whitelisted from activation via content settings or by the per-tab 32 // subresource filter. At this point, the embedder still has a chance to
33 // whitelist. 33 // return false to suppress the activation. Returns whether the activation
34 virtual bool ShouldSuppressActivation( 34 // should be whitelisted for this navigation.
35 content::NavigationHandle* navigation_handle) = 0; 35 //
36 // Precondition: The navigation must be a main frame navigation.
37 virtual bool OnPageActivationComputed(
38 content::NavigationHandle* navigation_handle,
39 bool activated) = 0;
36 40
37 // Adds |top_level_url| to the BLOCKED state via content settings for the 41 // Adds |top_level_url| to the BLOCKED state via content settings for the
38 // current profile. 42 // current profile.
39 virtual void WhitelistByContentSettings(const GURL& top_level_url) = 0; 43 virtual void WhitelistByContentSettings(const GURL& top_level_url) = 0;
40 44
41 // Adds |url| to a per-WebContents whitelist. 45 // Adds |url| to a per-WebContents whitelist.
42 virtual void WhitelistInCurrentWebContents(const GURL& url) = 0; 46 virtual void WhitelistInCurrentWebContents(const GURL& url) = 0;
43 47
44 virtual VerifiedRulesetDealer::Handle* GetRulesetDealer() = 0; 48 virtual VerifiedRulesetDealer::Handle* GetRulesetDealer() = 0;
45 }; 49 };
46 50
47 } // namespace subresource_filter 51 } // namespace subresource_filter
48 52
49 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_ H_ 53 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698