Index: components/web_restriction/web_restriction_provider.h |
diff --git a/components/web_restriction/web_restriction_provider.h b/components/web_restriction/web_restriction_provider.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fdaee3ebfa5c67043c18636224717ddcf586ce0d |
--- /dev/null |
+++ b/components/web_restriction/web_restriction_provider.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_PROVIDER_H_ |
+#define COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_PROVIDER_H_ |
+ |
+#include "base/callback_forward.h" |
+#include "base/macros.h" |
+#include "url/gurl.h" |
+ |
+namespace web_restriction { |
+ |
+enum UrlAccess { |
+ ALLOW, |
+ DISALLOW, |
+ PENDING |
+}; |
+ |
+class WebRestrictionProvider { |
+ public: |
+ virtual ~WebRestrictionProvider() {} |
+ |
+ virtual UrlAccess ShouldProceed( |
+ bool is_main_frame, |
+ const GURL& url, |
+ const base::Callback<void(bool)>& callback) = 0; |
+ |
+ virtual bool SupportsRequest() const = 0; |
+ |
+ virtual bool GetErrorHtml(const GURL& url, std::string* error_html) const = 0; |
+ |
+ virtual void RequestPermission( |
+ const GURL& url, |
+ const base::Callback<void(bool)>& callback) = 0; |
+}; |
+ |
+} // namespace web_restriction |
+ |
+#endif // COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_PROVIDER_H_ |