// 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 CHROME_BROWSER_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_PERMISSION_REQUEST_MANAGER_H_ #define CHROME_BROWSER_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_PERMISSION_REQUEST_MANAGER_H_ #include "base/containers/circular_deque.h" #include "base/files/file_path.h" #include "base/functional/callback_helpers.h" #include "base/memory/weak_ptr.h" #include "content/public/browser/file_system_access_permission_context.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" #include "url/origin.h" namespace permissions { enum class PermissionAction; } // This class manages File System Access permission requests for a particular // WebContents. It is very similar to the generic PermissionRequestManager // class, and as such deals with throttling, coallescing and/or completely // denying permission requests, depending on the situation and policy. // // File System Access code doesn't just use PermissionRequestManager directly // because the permission requests use different UI, and as such can't easily // be supported by PermissionRequestManager. // // The FileSystemAccessPermissionRequestManager should be used on the UI thread. // // TODO(crbug.com/40101962): Add test for this class. class FileSystemAccessPermissionRequestManager : public content::WebContentsObserver, public content::WebContentsUserData< FileSystemAccessPermissionRequestManager> { … }; #endif // CHROME_BROWSER_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_PERMISSION_REQUEST_MANAGER_H_