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

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

Issue 2795053002: [subresource_filter] Implement the "Smart" UI on Android (Closed)
Patch Set: raymes review Created 3 years, 8 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 9
10 class GURL; 10 class GURL;
11 11
12 namespace subresource_filter { 12 namespace subresource_filter {
13 13
14 struct ActivationState;
15
14 class SubresourceFilterClient { 16 class SubresourceFilterClient {
15 public: 17 public:
16 virtual ~SubresourceFilterClient() = default; 18 virtual ~SubresourceFilterClient() = default;
17 19
18 // Changes the visibility of the prompt that informs the user that potentially 20 // Changes the visibility of the prompt that informs the user that potentially
19 // deceptive content has been blocked on the page according to the passed 21 // deceptive content has been blocked on the page according to the passed
20 // |visibility| parameter. When |visibility| is set to true, an icon on the 22 // |visibility| parameter. When |visibility| is set to true, an icon on the
21 // right side of the omnibox is displayed. If the user clicks on the icon then 23 // right side of the omnibox is displayed. If the user clicks on the icon then
22 // a bubble is shown that explains the feature and alalows the user to turn it 24 // a bubble is shown that explains the feature and alalows the user to turn it
23 // off. 25 // off.
24 virtual void ToggleNotificationVisibility(bool visibility) = 0; 26 virtual void ToggleNotificationVisibility(bool visibility) = 0;
25 27
26 // Returns true if the given URL is whitelisted from activation via content 28 // Returns true if the given URL is whitelisted from activation via content
27 // settings. This should only be called for main frame URLs. 29 // settings. This should only be called for main frame URLs.
28 virtual bool IsWhitelistedByContentSettings(const GURL& url) = 0; 30 virtual bool IsWhitelistedByContentSettings(const GURL& top_level_url) = 0;
29 31
30 // Adds |url| to the BLOCKED state via content settings for the current 32 // Adds |top_level_url| to the BLOCKED state via content settings for the
31 // profile. 33 // current profile.
32 virtual void WhitelistByContentSettings(const GURL& url) = 0; 34 virtual void WhitelistByContentSettings(const GURL& top_level_url) = 0;
33 35
34 virtual VerifiedRulesetDealer::Handle* GetRulesetDealer() = 0; 36 virtual VerifiedRulesetDealer::Handle* GetRulesetDealer() = 0;
37
38 virtual void OnActivationComputed(
39 const GURL& top_level_url,
40 const ActivationState& activation_state) = 0;
35 }; 41 };
36 42
37 } // namespace subresource_filter 43 } // namespace subresource_filter
38 44
39 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_ H_ 45 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698