summaryrefslogtreecommitdiffstats
path: root/src/core/content_browser_client_qt.cpp
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2022-05-09 13:06:06 +0200
committerSzabolcs David <davidsz@inf.u-szeged.hu>2022-05-26 12:10:35 +0200
commit567739fda232c28992962f32a9e652eab723a4d4 (patch)
treecb933c189d87ed104f71ad8393d9e93d0eec193a /src/core/content_browser_client_qt.cpp
parent2ba1f04b4589e5883a399b022b7795266c4d4646 (diff)
Implement File System Access permission API
Allow web pages to safely access the local file system by exposing a permission API. Permissions are stored in-memory. The built-in access rules are the same as the behavior of Chrome: JS can't request access to system libraries, sensitive directories and the application itself. Task-number: QTBUG-97829 Change-Id: Ic675422cafbad5a90243b4fa8f0749c46afa192c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/content_browser_client_qt.cpp')
-rw-r--r--src/core/content_browser_client_qt.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index bede258f3..01b4fa1f3 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -92,6 +92,7 @@
#include "client_cert_select_controller.h"
#include "custom_handlers/protocol_handler_registry_factory.h"
#include "devtools_manager_delegate_qt.h"
+#include "file_system_access/file_system_access_permission_request_manager_qt.h"
#include "login_delegate_qt.h"
#include "media_capture_devices_dispatcher.h"
#include "net/cookie_monster_delegate_qt.h"
@@ -1250,6 +1251,7 @@ void ContentBrowserClientQt::SiteInstanceDeleting(content::SiteInstance *site_in
content::WebContentsViewDelegate *ContentBrowserClientQt::GetWebContentsViewDelegate(content::WebContents *web_contents)
{
FormInteractionTabHelper::CreateForWebContents(web_contents);
+ FileSystemAccessPermissionRequestManagerQt::CreateForWebContents(web_contents);
if (auto *registry = performance_manager::PerformanceManagerRegistry::GetInstance())
registry->MaybeCreatePageNodeForWebContents(web_contents);