summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader/FileRequest.h
diff options
context:
space:
mode:
authorLucas CHOLLET <lucas.chollet@free.fr>2022-02-26 17:50:31 +0100
committerLinus Groh <mail@linusgroh.de>2022-06-27 20:22:15 +0100
commit662711fa26de109d4c8fe1d93f17e1983d66ebf3 (patch)
treec138ed6b424be28e01db85e74f81f5a31632d6f4 /Userland/Libraries/LibWeb/Loader/FileRequest.h
parent1ba9c821fbfc54562e10981a3403aa25fb6079b3 (diff)
downloadserenity-662711fa26de109d4c8fe1d93f17e1983d66ebf3.zip
Browser+LibWeb+WebContent: Allow Browser to load local files
To achieve this goal: - The Browser unveils "/tmp/portal/filesystemaccess" - Pass the page through LoadRequest => ResourceLoader - ResourceLoader requests a file to the FileSystemAccessServer via IPC - OutOfProcessWebView handles it and sends a file descriptor back to the Page.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader/FileRequest.h')
-rw-r--r--Userland/Libraries/LibWeb/Loader/FileRequest.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/FileRequest.h b/Userland/Libraries/LibWeb/Loader/FileRequest.h
new file mode 100644
index 0000000000..ca4251fbca
--- /dev/null
+++ b/Userland/Libraries/LibWeb/Loader/FileRequest.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2022, Lucas Chollet <lucas.chollet@free.fr>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/Error.h>
+#include <AK/Function.h>
+#include <AK/RefCounted.h>
+#include <AK/String.h>
+
+namespace Web {
+
+class FileRequest : public RefCounted<FileRequest> {
+public:
+ explicit FileRequest(String path);
+
+ String path() const;
+
+ Function<void(ErrorOr<i32>)> on_file_request_finish;
+
+private:
+ String m_path {};
+};
+
+}