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.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 532d9653b..0aef029cf 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -233,10 +233,11 @@ QUrl WebContentsDelegateQt::url(content::WebContents* source) const {
m_pendingUrlUpdate = false;
return newUrl;
}
-void WebContentsDelegateQt::AddNewContents(content::WebContents* source, std::unique_ptr<content::WebContents> new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture, bool* was_blocked)
+void WebContentsDelegateQt::AddNewContents(content::WebContents* source, std::unique_ptr<content::WebContents> new_contents, const GURL &target_url,
+ WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture, bool* was_blocked)
{
Q_UNUSED(source)
- QSharedPointer<WebContentsAdapter> newAdapter = createWindow(std::move(new_contents), disposition, initial_pos, m_initialTargetUrl, user_gesture);
+ QSharedPointer<WebContentsAdapter> newAdapter = createWindow(std::move(new_contents), disposition, initial_pos, toQt(target_url), user_gesture);
// Chromium can forget to pass user-agent override settings to new windows (see QTBUG-61774 and QTBUG-76249),
// so set it here. Note the actual value doesn't really matter here. Only the second value does, but we try
// to give the correct user-agent anyway.
@@ -322,7 +323,7 @@ void WebContentsDelegateQt::RenderFrameHostChanged(content::RenderFrameHost *old
m_frameFocusedObserver.addNode(new_node);
// Is this a main frame?
- if (new_host->GetFrameOwnerElementType() == blink::FrameOwnerElementType::kNone) {
+ if (new_host->GetFrameOwnerElementType() == blink::mojom::FrameOwnerElementType::kNone) {
content::RenderProcessHost *renderProcessHost = new_host->GetProcess();
const base::Process &process = renderProcessHost->GetProcess();
if (process.IsValid())
@@ -561,9 +562,8 @@ void WebContentsDelegateQt::DidUpdateFaviconURL(const std::vector<blink::mojom::
void WebContentsDelegateQt::WebContentsCreated(content::WebContents * /*source_contents*/,
int /*opener_render_process_id*/, int /*opener_render_frame_id*/,
const std::string &/*frame_name*/,
- const GURL &target_url, content::WebContents *newContents)
+ const GURL &/*target_url*/, content::WebContents *newContents)
{
- m_initialTargetUrl = toQt(target_url);
if (auto *view = static_cast<content::WebContentsImpl *>(newContents)->GetView())
static_cast<WebContentsViewQt *>(view)->setFactoryClient(m_viewClient);
}