#include "content/browser/web_contents/file_chooser_impl.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/ranges/algorithm.h"
#include "base/task/thread_pool.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/renderer_host/back_forward_cache_disable.h"
#include "content/browser/renderer_host/render_frame_host_delegate.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
namespace content {
namespace {
std::vector<blink::mojom::FileChooserFileInfoPtr> RemoveSymlinks(
std::vector<blink::mojom::FileChooserFileInfoPtr> files,
base::FilePath base_dir) { … }
}
FileChooserImpl::FileSelectListenerImpl::FileSelectListenerImpl(
FileChooserImpl* owner)
: … { … }
FileChooserImpl::FileSelectListenerImpl::~FileSelectListenerImpl() { … }
void FileChooserImpl::FileSelectListenerImpl::SetFullscreenBlock(
base::ScopedClosureRunner fullscreen_block) { … }
void FileChooserImpl::FileSelectListenerImpl::FileSelected(
std::vector<blink::mojom::FileChooserFileInfoPtr> files,
const base::FilePath& base_dir,
blink::mojom::FileChooserParams::Mode mode) { … }
void FileChooserImpl::FileSelectListenerImpl::FileSelectionCanceled() { … }
void FileChooserImpl::FileSelectListenerImpl::
SetListenerFunctionCalledTrueForTesting() { … }
void FileChooserImpl::Create(
RenderFrameHostImpl* render_frame_host,
mojo::PendingReceiver<blink::mojom::FileChooser> receiver) { … }
mojo::Remote<blink::mojom::FileChooser> FileChooserImpl::CreateBoundForTesting(
RenderFrameHostImpl* render_frame_host) { … }
std::pair<FileChooserImpl*, mojo::Remote<blink::mojom::FileChooser>>
FileChooserImpl::CreateForTesting(RenderFrameHostImpl* render_frame_host) { … }
FileChooserImpl::FileChooserImpl(RenderFrameHostImpl* render_frame_host)
: … { … }
FileChooserImpl::~FileChooserImpl() = default;
void FileChooserImpl::OpenFileChooser(blink::mojom::FileChooserParamsPtr params,
OpenFileChooserCallback callback) { … }
void FileChooserImpl::EnumerateChosenDirectory(
const base::FilePath& directory_path,
EnumerateChosenDirectoryCallback callback) { … }
void FileChooserImpl::FileSelected(
const base::FilePath& base_dir,
blink::mojom::FileChooserParams::Mode mode,
std::vector<blink::mojom::FileChooserFileInfoPtr> files) { … }
void FileChooserImpl::FileSelectionCanceled() { … }
RenderFrameHostImpl* FileChooserImpl::render_frame_host() { … }
}