summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index c2cccfedb..d64584c47 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -40,6 +40,7 @@
#include "web_contents_delegate_qt.h"
+#include "browser_context_adapter.h"
#include "media_capture_devices_dispatcher.h"
#include "type_conversion.h"
#include "web_contents_adapter_client.h"
@@ -268,11 +269,21 @@ void WebContentsDelegateQt::UpdateTargetURL(content::WebContents *source, int32
void WebContentsDelegateQt::DidNavigateAnyFrame(const content::LoadCommittedDetails &, const content::FrameNavigateParams &params)
{
- if (!params.should_update_history)
+ // VisistedLinksMaster asserts !IsOffTheRecord().
+ if (!params.should_update_history || !m_viewClient->browserContextAdapter()->trackVisitedLinks())
return;
- WebEngineContext::current()->visitedLinksManager()->addUrl(params.url);
+ m_viewClient->browserContextAdapter()->visitedLinksManager()->addUrl(params.url);
}
+void WebContentsDelegateQt::RequestToLockMouse(content::WebContents *web_contents, bool user_gesture, bool last_unlocked_by_target)
+{
+ Q_UNUSED(user_gesture);
+
+ if (last_unlocked_by_target)
+ web_contents->GotResponseToLockMouseRequest(true);
+ else
+ m_viewClient->runMouseLockPermissionRequest(toQt(web_contents->GetVisibleURL()));
+}
void WebContentsDelegateQt::overrideWebPreferences(content::WebContents *, WebPreferences *webPreferences)
{
@@ -300,3 +311,9 @@ void WebContentsDelegateQt::allowCertificateError(const QExplicitlySharedDataPoi
{
m_viewClient->allowCertificateError(errorController);
}
+
+void WebContentsDelegateQt::requestGeolocationPermission(const GURL &requestingFrameOrigin, base::Callback<void (bool)> resultCallback, base::Closure *cancelCallback)
+{
+ m_lastGeolocationRequestCallbacks = qMakePair(resultCallback, cancelCallback);
+ m_viewClient->runGeolocationPermissionRequest(toQt(requestingFrameOrigin));
+}