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.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_
|
|
|
|
#define ELECTRON_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
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
|
|
|
|
class ElectronQuotaPermissionContext : public content::QuotaPermissionContext {
|
|
|
|
public:
|
|
|
|
typedef content::QuotaPermissionContext::QuotaPermissionResponse response;
|
|
|
|
|
|
|
|
ElectronQuotaPermissionContext();
|
|
|
|
|
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:
|
2018-04-17 23:23:40 +00:00
|
|
|
~ElectronQuotaPermissionContext() override;
|
2015-05-12 12:22:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_
|