summaryrefslogtreecommitdiffstats
path: root/src/core/api/qwebengineprofile.cpp
diff options
context:
space:
mode:
authorMartin Negyokru <negyokru@inf.u-szeged.hu>2024-10-31 16:07:11 +0100
committerMartin Negyokru <negyokru@inf.u-szeged.hu>2025-05-29 08:54:07 +0200
commit91f45c8e59bc4b9afd7b3a52d3c05e339a19ce71 (patch)
treea07418490848e27e46389d396fa628768000b671 /src/core/api/qwebengineprofile.cpp
parent7b22a723e8515329dd334d35377f86e371f29c7d (diff)
Add API for extension management
Introduce QWebEngineExtensionManager and QWebEngineExtensionInfo. The manager has methods to load and install Chrome extensions from the filesystem. QWebEngineExtensionInfo provides information about a loaded extension. The current state of our js extension API support is very limited meaning most of the extensions downloaded from Chrome extension store won't work. Adding support for these APIs will be done in followup patches. Fixes: QTBUG-118452 Task-number: QTBUG-61676 Change-Id: I017ad5e8d2ba963afbd2f31ac36fee9451a951bd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/api/qwebengineprofile.cpp')
-rw-r--r--src/core/api/qwebengineprofile.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/api/qwebengineprofile.cpp b/src/core/api/qwebengineprofile.cpp
index ceeff460a..6683d51c1 100644
--- a/src/core/api/qwebengineprofile.cpp
+++ b/src/core/api/qwebengineprofile.cpp
@@ -7,6 +7,7 @@
#include "qwebenginecookiestore.h"
#include "qwebenginedownloadrequest.h"
#include "qwebenginedownloadrequest_p.h"
+#include "qwebengineextensionmanager.h"
#include "qwebenginenotification.h"
#include "qwebenginesettings.h"
#include "qwebenginescriptcollection.h"
@@ -1094,6 +1095,22 @@ QWebEngineClientHints *QWebEngineProfile::clientHints() const
return d->m_clientHints.data();
}
+/*!
+ Returns the extension manager associated with this browsing context.
+
+ \since 6.10
+ \sa QWebEngineExtensionManager
+*/
+QWebEngineExtensionManager *QWebEngineProfile::extensionManager()
+{
+#if QT_CONFIG(webengine_extensions)
+ Q_D(QWebEngineProfile);
+ return d->profileAdapter()->extensionManager();
+#else
+ return nullptr;
+#endif
+}
+
QT_END_NAMESPACE
#include "moc_qwebengineprofile.cpp"