#include "third_party/blink/renderer/modules/storage_access/storage_access_handle.h"
#include "base/types/pass_key.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_storage_estimate.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_storage_usage_details.h"
#include "third_party/blink/renderer/core/fileapi/blob.h"
#include "third_party/blink/renderer/core/workers/shared_worker.h"
#include "third_party/blink/renderer/modules/broadcastchannel/broadcast_channel.h"
#include "third_party/blink/renderer/modules/file_system_access/storage_manager_file_system_access.h"
#include "third_party/blink/renderer/modules/storage_access/global_storage_access_handle.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
namespace blink {
PassKey;
const char StorageAccessHandle::kSupplementName[] = …;
const char StorageAccessHandle::kSessionStorageNotRequested[] = …;
const char StorageAccessHandle::kLocalStorageNotRequested[] = …;
const char StorageAccessHandle::kIndexedDBNotRequested[] = …;
const char StorageAccessHandle::kLocksNotRequested[] = …;
const char StorageAccessHandle::kCachesNotRequested[] = …;
const char StorageAccessHandle::kGetDirectoryNotRequested[] = …;
const char StorageAccessHandle::kEstimateNotRequested[] = …;
const char StorageAccessHandle::kCreateObjectURLNotRequested[] = …;
const char StorageAccessHandle::kRevokeObjectURLNotRequested[] = …;
const char StorageAccessHandle::kBroadcastChannelNotRequested[] = …;
const char StorageAccessHandle::kSharedWorkerNotRequested[] = …;
namespace {
void EstimateImplAfterRemoteEstimate(
ScriptPromiseResolver<StorageEstimate>* resolver,
int64_t current_usage,
int64_t current_quota,
bool success) { … }
}
StorageAccessHandle::StorageAccessHandle(
LocalDOMWindow& window,
const StorageAccessTypes* storage_access_types)
: … { … }
void StorageAccessHandle::Trace(Visitor* visitor) const { … }
StorageArea* StorageAccessHandle::sessionStorage(
ExceptionState& exception_state) const { … }
StorageArea* StorageAccessHandle::localStorage(
ExceptionState& exception_state) const { … }
IDBFactory* StorageAccessHandle::indexedDB(
ExceptionState& exception_state) const { … }
LockManager* StorageAccessHandle::locks(ExceptionState& exception_state) const { … }
CacheStorage* StorageAccessHandle::caches(
ExceptionState& exception_state) const { … }
ScriptPromise<FileSystemDirectoryHandle> StorageAccessHandle::getDirectory(
ScriptState* script_state,
ExceptionState& exception_state) const { … }
void StorageAccessHandle::GetDirectoryImpl(
ScriptPromiseResolver<FileSystemDirectoryHandle>* resolver) const { … }
ScriptPromise<StorageEstimate> StorageAccessHandle::estimate(
ScriptState* script_state,
ExceptionState& exception_state) const { … }
String StorageAccessHandle::createObjectURL(
Blob* blob,
ExceptionState& exception_state) const { … }
void StorageAccessHandle::revokeObjectURL(
const String& url,
ExceptionState& exception_state) const { … }
BroadcastChannel* StorageAccessHandle::BroadcastChannel(
ExecutionContext* execution_context,
const String& name,
ExceptionState& exception_state) const { … }
blink::SharedWorker* StorageAccessHandle::SharedWorker(
ExecutionContext* context,
const String& url,
const V8UnionSharedWorkerOptionsOrString* name_or_options,
ExceptionState& exception_state) const { … }
namespace bindings {
ExecutionContext* ExecutionContextFromV8Wrappable(
const StorageAccessHandle* storage_access_handle) { … }
}
}