#include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h"
#include "base/command_line.h"
#include "chrome/browser/ui/file_system_access/file_system_access_dialogs.h"
#include "chrome/browser/ui/file_system_access/file_system_access_permission_dialog.h"
#include "components/permissions/permission_util.h"
#include "components/permissions/switches.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
namespace {
FileRequestData;
RequestData;
RequestType;
bool AllFileRequestDataAreIdentical(const std::vector<FileRequestData>& a,
const std::vector<FileRequestData>& b) { … }
bool RequestsAreIdentical(const RequestData& a, const RequestData& b) { … }
bool NewPermissionRequestsAreForSamePath(const RequestData& a,
const RequestData& b) { … }
}
struct FileSystemAccessPermissionRequestManager::Request { … };
FileSystemAccessPermissionRequestManager::
~FileSystemAccessPermissionRequestManager() = default;
FileSystemAccessPermissionRequestManager::RequestData::RequestData(
RequestType request_type,
const url::Origin& origin,
const std::vector<FileRequestData>& file_request_data)
: … { … }
FileSystemAccessPermissionRequestManager::RequestData::~RequestData() = default;
FileSystemAccessPermissionRequestManager::RequestData::RequestData(
RequestData&&) = default;
FileSystemAccessPermissionRequestManager::RequestData::RequestData(
const RequestData&) = default;
void FileSystemAccessPermissionRequestManager::AddRequest(
RequestData data,
base::OnceCallback<void(permissions::PermissionAction result)> callback,
base::ScopedClosureRunner fullscreen_block) { … }
FileSystemAccessPermissionRequestManager::
FileSystemAccessPermissionRequestManager(content::WebContents* web_contents)
: … { … }
bool FileSystemAccessPermissionRequestManager::CanShowRequest() const { … }
void FileSystemAccessPermissionRequestManager::ScheduleShowRequest() { … }
void FileSystemAccessPermissionRequestManager::DequeueAndShowRequest() { … }
void FileSystemAccessPermissionRequestManager::
DocumentOnLoadCompletedInPrimaryMainFrame() { … }
void FileSystemAccessPermissionRequestManager::OnPermissionDialogResult(
permissions::PermissionAction result) { … }
WEB_CONTENTS_USER_DATA_KEY_IMPL(FileSystemAccessPermissionRequestManager);