| Index: components/web_restrictions/web_restrictions_provider.h
|
| diff --git a/components/web_restrictions/web_restrictions_provider.h b/components/web_restrictions/web_restrictions_provider.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..822d20544de748a108a468c5272e49ed1ce4ecc6
|
| --- /dev/null
|
| +++ b/components/web_restrictions/web_restrictions_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_restrictions {
|
| +
|
| +enum UrlAccess {
|
| + ALLOW,
|
| + DISALLOW,
|
| + PENDING
|
| +};
|
| +
|
| +class WebRestrictionsProvider {
|
| + public:
|
| + virtual ~WebRestrictionsProvider() {}
|
| +
|
| + 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_restrictions
|
| +
|
| +#endif // COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_PROVIDER_H_
|
|
|