summaryrefslogtreecommitdiffstats
path: root/src/core/content_main_delegate_qt.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-06-07 16:37:02 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-02 20:52:46 +0000
commit5d79af42e1e442ef67b3f1c87ae75d60a22ef9fc (patch)
treeddafad6255d4766b669c200b1ab3d60d11623efe /src/core/content_main_delegate_qt.cpp
parent36cb71a4808456b6851c3fc7ddb2aa57bf286117 (diff)
Add QWebEngineUrlScheme class
Public API for the new url/url_util_qt extension to Chromium, which allows to integrate custom schemes into Chromium's url parsing library and security model. Previously custom schemes would be treated as 'unknown' schemes and rely on fallback behavior in Chromium. [ChangeLog][Custom Schemes] Added the QWebEngineUrlScheme class for configuring how custom schemes are parsed and which security restrictions should apply. Task-number: QTBUG-62536 Change-Id: I7d8b9da3ad742f568b82ccc6a2456ad35e84069b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/content_main_delegate_qt.cpp')
-rw-r--r--src/core/content_main_delegate_qt.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index 666fa848f..3989170a0 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -53,6 +53,7 @@
#include <ui/base/webui/jstemplate_builder.h>
#include "net/grit/net_resources.h"
#include "net/base/net_module.h"
+#include "url/url_util_qt.h"
#include "content_client_qt.h"
#include "renderer/content_renderer_client_qt.h"
@@ -214,6 +215,9 @@ bool ContentMainDelegateQt::BasicStartupComplete(int *exit_code)
SafeOverridePath(base::DIR_APP_DICTIONARIES, WebEngineLibraryInfo::getPath(base::DIR_APP_DICTIONARIES));
#endif
SetContentClient(new ContentClientQt);
+
+ url::CustomScheme::LoadSchemes(base::CommandLine::ForCurrentProcess());
+
return false;
}