mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
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.
This commit is contained in:
parent
1ba9c821fb
commit
662711fa26
21 changed files with 165 additions and 14 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <AK/URL.h>
|
||||
#include <LibCore/ElapsedTimer.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
namespace Web {
|
||||
|
||||
|
@ -37,6 +38,9 @@ public:
|
|||
void start_timer() { m_load_timer.start(); };
|
||||
Time load_time() const { return m_load_timer.elapsed_time(); }
|
||||
|
||||
Optional<Page&>& page() { return m_page; };
|
||||
void set_page(Page& page) { m_page = page; }
|
||||
|
||||
unsigned hash() const
|
||||
{
|
||||
auto body_hash = string_hash((char const*)m_body.data(), m_body.size());
|
||||
|
@ -70,6 +74,7 @@ private:
|
|||
HashMap<String, String> m_headers;
|
||||
ByteBuffer m_body;
|
||||
Core::ElapsedTimer m_load_timer;
|
||||
Optional<Page&> m_page;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue