// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_PUBLIC_BROWSER_FILE_SYSTEM_ACCESS_PERMISSION_GRANT_H_ #define CONTENT_PUBLIC_BROWSER_FILE_SYSTEM_ACCESS_PERMISSION_GRANT_H_ #include "base/functional/callback.h" #include "base/memory/ref_counted.h" #include "base/observer_list.h" #include "base/observer_list_types.h" #include "content/common/content_export.h" #include "content/public/browser/global_routing_id.h" #include "third_party/blink/public/mojom/permissions/permission_status.mojom-forward.h" namespace base { class FilePath; } namespace content { // A ref-counted permission grant. This is needed so the implementation of // this class can keep track of references to permissions, and clean up state // when no more references remain. Multiple FileSystemAccessHandle instances // can share the same permission grant. For example a directory and all its // children will use the same grant. // // Instances of this class can be retrieved via a // FileSystemAccessPermissionContext instance. // // FileSystemAccessPermissionGrant instances are not thread safe, and should // only be used (and referenced) on the same sequence as the PermissionContext // that created them, i.e. the UI thread. class CONTENT_EXPORT FileSystemAccessPermissionGrant : public base::RefCounted<FileSystemAccessPermissionGrant> { … }; } // namespace content #endif // CONTENT_PUBLIC_BROWSER_FILE_SYSTEM_ACCESS_PERMISSION_GRANT_H_