2015-05-12 12:22:30 +00:00
|
|
|
// Copyright (c) 2015 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
#ifndef SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_
|
|
|
|
#define SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_
|
2015-05-12 12:22:30 +00:00
|
|
|
|
|
|
|
#include "content/public/browser/quota_permission_context.h"
|
2021-07-02 00:51:37 +00:00
|
|
|
|
|
|
|
namespace content {
|
|
|
|
struct StorageQuotaParams;
|
|
|
|
}
|
2015-05-12 12:22:30 +00:00
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2015-05-12 12:22:30 +00:00
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
class ElectronQuotaPermissionContext : public content::QuotaPermissionContext {
|
2015-05-12 12:22:30 +00:00
|
|
|
public:
|
|
|
|
typedef content::QuotaPermissionContext::QuotaPermissionResponse response;
|
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
ElectronQuotaPermissionContext();
|
2015-05-12 12:22:30 +00:00
|
|
|
|
2021-11-03 11:41:45 +00:00
|
|
|
// disable copy
|
|
|
|
ElectronQuotaPermissionContext(const ElectronQuotaPermissionContext&) =
|
|
|
|
delete;
|
|
|
|
ElectronQuotaPermissionContext& operator=(
|
|
|
|
const ElectronQuotaPermissionContext&) = delete;
|
|
|
|
|
2015-05-12 12:22:30 +00:00
|
|
|
// content::QuotaPermissionContext:
|
2018-04-18 01:44:10 +00:00
|
|
|
void RequestQuotaPermission(const content::StorageQuotaParams& params,
|
|
|
|
int render_process_id,
|
2019-12-13 20:13:12 +00:00
|
|
|
PermissionCallback callback) override;
|
2015-05-12 12:22:30 +00:00
|
|
|
|
|
|
|
private:
|
2020-02-04 20:19:40 +00:00
|
|
|
~ElectronQuotaPermissionContext() override;
|
2015-05-12 12:22:30 +00:00
|
|
|
};
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
} // namespace electron
|
2015-05-12 12:22:30 +00:00
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
#endif // SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_
|