summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index dc20ea180..9398046d0 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -776,6 +776,20 @@ void WebContentsAdapter::runGeolocationRequestCallback(const QUrl &securityOrigi
d->webContentsDelegate->m_lastGeolocationRequestCallbacks.first.Run(allowed);
}
+void WebContentsAdapter::grantMouseLockPermission(bool granted)
+{
+ Q_D(WebContentsAdapter);
+
+ if (granted) {
+ if (RenderWidgetHostViewQt *rwhv = static_cast<RenderWidgetHostViewQt *>(d->webContents->GetRenderWidgetHostView()))
+ rwhv->Focus();
+ else
+ granted = false;
+ }
+
+ d->webContents->GotResponseToLockMouseRequest(granted);
+}
+
void WebContentsAdapter::dpiScaleChanged()
{
Q_D(WebContentsAdapter);