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

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: fix tests 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 class GURL; 8 class GURL;
9 9
10 namespace subresource_filter { 10 namespace subresource_filter {
11 11
12 class SubresourceFilterClient { 12 class SubresourceFilterClient {
13 public: 13 public:
14 virtual ~SubresourceFilterClient() = default; 14 virtual ~SubresourceFilterClient() = default;
15 15
16 // Changes the visibility of the prompt that informs the user that potentially 16 // Changes the visibility of the prompt that informs the user that potentially
17 // deceptive content has been blocked on the page according to the passed 17 // deceptive content has been blocked on the page according to the passed
18 // |visibility| parameter. When |visibility| is set to true, an icon on the 18 // |visibility| parameter. When |visibility| is set to true, an icon on the
19 // right side of the omnibox is displayed. If the user clicks on the icon then 19 // right side of the omnibox is displayed. If the user clicks on the icon then
20 // a bubble is shown that explains the feature and alalows the user to turn it 20 // a bubble is shown that explains the feature and alalows the user to turn it
21 // off. 21 // off.
22 virtual void ToggleNotificationVisibility(bool visibility) = 0; 22 virtual void ToggleNotificationVisibility(const GURL& url,
23 bool visibility) = 0;
23 24
24 // Returns true if the given URL is whitelisted from activation via content 25 // Returns true if the given URL is whitelisted from activation via content
25 // settings. This should only be called for main frame URLs. 26 // settings. This should only be called for main frame URLs.
26 virtual bool IsWhitelistedByContentSettings(const GURL& url) = 0; 27 virtual bool IsWhitelistedByContentSettings(const GURL& url) = 0;
27 28
28 // Adds |url| to the BLOCKED state via content settings for the current 29 // Adds |url| to the BLOCKED state via content settings for the current
29 // profile. 30 // profile.
30 virtual void WhitelistByContentSettings(const GURL& url) = 0; 31 virtual void WhitelistByContentSettings(const GURL& url) = 0;
31 }; 32 };
32 33
33 } // namespace subresource_filter 34 } // namespace subresource_filter
34 35
35 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_ H_ 36 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_CLIENT_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698