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.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 4cfcf6acd..6d763faa5 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -710,8 +710,6 @@ void WebContentsAdapter::load(const QWebEngineHttpRequest &request)
if (!adapter)
return;
adapter->webContents()->GetController().LoadURLWithParams(params);
- // Follow chrome::Navigate and invalidate the URL immediately.
- adapter->m_webContentsDelegate->NavigationStateChanged(adapter->webContents(), content::INVALIDATE_TYPE_URL);
adapter->focusIfNecessary();
};
@@ -769,7 +767,7 @@ void WebContentsAdapter::save(const QString &filePath, int savePageFormat)
QUrl WebContentsAdapter::activeUrl() const
{
CHECK_INITIALIZED(QUrl());
- return m_webContentsDelegate->url();
+ return m_webContentsDelegate->url(webContents());
}
QUrl WebContentsAdapter::requestedUrl() const
@@ -1141,6 +1139,17 @@ bool WebContentsAdapter::recentlyAudible() const
return m_webContents->IsCurrentlyAudible();
}
+qint64 WebContentsAdapter::renderProcessPid() const
+{
+ CHECK_INITIALIZED(0);
+
+ content::RenderProcessHost *renderProcessHost = m_webContents->GetMainFrame()->GetProcess();
+ const base::Process &process = renderProcessHost->GetProcess();
+ if (!process.IsValid())
+ return 0;
+ return process.Pid();
+}
+
void WebContentsAdapter::copyImageAt(const QPoint &location)
{
CHECK_INITIALIZED();
@@ -1894,7 +1903,7 @@ void WebContentsAdapter::discard()
// Based on TabLifecycleUnitSource::TabLifecycleUnit::FinishDiscard
if (m_webContents->IsLoading()) {
- m_webContentsDelegate->didFailLoad(m_webContentsDelegate->url(), net::Error::ERR_ABORTED,
+ m_webContentsDelegate->didFailLoad(m_webContentsDelegate->url(webContents()), net::Error::ERR_ABORTED,
QStringLiteral("Discarded"));
}