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

Side by Side Diff: components/web_restriction/web_restriction_provider.h

Issue 1423713015: [WIP] WebRestrictions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: continue review in split cl Created 4 years, 11 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_PROVIDER_H_
6 #define COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_PROVIDER_H_
7
8 #include "base/callback_forward.h"
9 #include "base/macros.h"
10 #include "url/gurl.h"
11
12 namespace web_restriction {
13
14 enum UrlAccess {
15 ALLOW,
16 DISALLOW,
17 PENDING
18 };
19
20 class WebRestrictionProvider {
21 public:
22 virtual ~WebRestrictionProvider() {}
23
24 virtual UrlAccess ShouldProceed(
25 bool is_main_frame,
26 const GURL& url,
27 const base::Callback<void(bool)>& callback) = 0;
28
29 virtual bool SupportsRequest() const = 0;
30
31 virtual bool GetErrorHtml(const GURL& url, std::string* error_html) const = 0;
32
33 virtual void RequestPermission(
34 const GURL& url,
35 const base::Callback<void(bool)>& callback) = 0;
36 };
37
38 } // namespace web_restriction
39
40 #endif // COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698