OLD | NEW |
---|---|
(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 { ALLOW, DISALLOW, UNKNOWN }; | |
Bernhard Bauer
2016/01/22 17:32:32
Put the values on individual lines.
knn
2016/01/25 11:54:24
Done.
| |
15 | |
16 class WebRestrictionProvider { | |
17 public: | |
18 class Observer { | |
Bernhard Bauer
2016/01/22 17:32:32
You could consider using a callback instead of a s
knn
2016/01/25 11:54:24
Done.
| |
19 public: | |
20 virtual void ProviderUpdated(); | |
21 }; | |
22 | |
23 virtual ~WebRestrictionProvider(){}; | |
Bernhard Bauer
2016/01/22 17:32:32
No semicolon after a method body.
knn
2016/01/25 11:54:24
Done.
| |
24 | |
25 virtual UrlAccess ShouldProceed(bool is_main_frame, | |
26 const GURL& url) const = 0; | |
27 | |
28 virtual void ShouldProceed( | |
29 bool is_main_frame, | |
30 const GURL& url, | |
31 const base::Callback<void(bool)>& callback) const = 0; | |
32 | |
33 virtual bool SupportsRequest() const = 0; | |
34 | |
35 virtual bool SupportsCustomErrorPage() const = 0; | |
36 | |
37 virtual std::string GetErrorHtml() const = 0; | |
38 | |
39 virtual void RequestPermission(const GURL& url) = 0; | |
40 | |
41 virtual void AddObserver(Observer* observer) = 0; | |
42 | |
43 virtual void RemoveObserver(Observer* observer) = 0; | |
44 }; | |
45 | |
46 } // namespace web_restriction | |
47 | |
48 #endif // COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_PROVIDER_H_ | |
OLD | NEW |