summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-27 17:56:17 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-09-22 08:47:36 +0000
commit5d0fbf8a6890c395c0cdc0c60e775b70c95e15ed (patch)
treec6354b09515a9110c121e3a3f3e97dd94b9b788a /src/core/web_contents_delegate_qt.cpp
parent43b7af20c421e4ffb20cd4625f3b704e78e7325d (diff)
General adaptations for Chromium 69
Change-Id: Ifeaf0ee13213dc5a24d2f2b4655cf7f405cddef7 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 68755ae70..11f64c5ad 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -215,7 +215,7 @@ void WebContentsDelegateQt::NavigationStateChanged(content::WebContents* source,
// Make sure to only emit the signal when loading isn't in progress, because it causes multiple
// false signals to be emitted.
if ((changed_flags & content::INVALIDATE_TYPE_TAB) && !(changed_flags & content::INVALIDATE_TYPE_LOAD)) {
- m_viewClient->recentlyAudibleChanged(source->WasRecentlyAudible());
+ m_viewClient->recentlyAudibleChanged(source->IsCurrentlyAudible());
}
}
@@ -477,14 +477,17 @@ void WebContentsDelegateQt::FindReply(content::WebContents *source, int request_
}
}
-void WebContentsDelegateQt::RequestMediaAccessPermission(content::WebContents *web_contents, const content::MediaStreamRequest &request, const content::MediaResponseCallback &callback)
+void WebContentsDelegateQt::RequestMediaAccessPermission(content::WebContents *web_contents, const content::MediaStreamRequest &request, content::MediaResponseCallback callback)
{
- MediaCaptureDevicesDispatcher::GetInstance()->processMediaAccessRequest(m_viewClient, web_contents, request, callback);
+ MediaCaptureDevicesDispatcher::GetInstance()->processMediaAccessRequest(m_viewClient, web_contents, request, std::move(callback));
}
-void WebContentsDelegateQt::MoveContents(content::WebContents *source, const gfx::Rect &pos)
+void WebContentsDelegateQt::SetContentsBounds(content::WebContents *source, const gfx::Rect &bounds)
{
- QRect frameGeometry(toQt(pos));
+ if (!source->HasOpener()) // is popup
+ return;
+
+ QRect frameGeometry(toQt(bounds));
QRect geometry;
if (RenderWidgetHostViewQt *rwhv = static_cast<RenderWidgetHostViewQt*>(web_contents()->GetRenderWidgetHostView())) {
if (rwhv->delegate() && rwhv->delegate()->window())
@@ -493,11 +496,6 @@ void WebContentsDelegateQt::MoveContents(content::WebContents *source, const gfx
m_viewClient->requestGeometryChange(geometry, frameGeometry);
}
-bool WebContentsDelegateQt::IsPopupOrPanel(const content::WebContents *source) const
-{
- return source->HasOpener();
-}
-
void WebContentsDelegateQt::UpdateTargetURL(content::WebContents* source, const GURL& url)
{
Q_UNUSED(source)