summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-03 18:46:06 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-06-26 08:17:25 +0000
commit57c49df9c6fcbaaffc66900e191312d4e0a0edfa (patch)
treea067be82e9c367673b3f8efdbcf0a21a780b5451 /src/core/web_contents_delegate_qt.cpp
parent8d752cab84d437244ef0c2318b70d6516e99a044 (diff)
Adaptations for Chromium 66
Change-Id: Iee88721a50036d4ef85a23dd1708d4fb84218708 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 8a3757838..3ebeaeb38 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -87,7 +87,8 @@
namespace QtWebEngineCore {
// Maps the LogSeverity defines in base/logging.h to the web engines message levels.
-static WebContentsAdapterClient::JavaScriptConsoleMessageLevel mapToJavascriptConsoleMessageLevel(int32_t messageLevel) {
+static WebContentsAdapterClient::JavaScriptConsoleMessageLevel mapToJavascriptConsoleMessageLevel(int32_t messageLevel)
+{
if (messageLevel < 1)
return WebContentsAdapterClient::Info;
else if (messageLevel > 1)
@@ -499,9 +500,10 @@ void WebContentsDelegateQt::UpdateTargetURL(content::WebContents* source, const
m_viewClient->didUpdateTargetURL(toQt(url));
}
-void WebContentsDelegateQt::WasShown()
+void WebContentsDelegateQt::OnVisibilityChanged(content::Visibility visibility)
{
- web_cache::WebCacheManager::GetInstance()->ObserveActivity(web_contents()->GetMainFrame()->GetProcess()->GetID());
+ if (visibility != content::Visibility::HIDDEN)
+ web_cache::WebCacheManager::GetInstance()->ObserveActivity(web_contents()->GetMainFrame()->GetProcess()->GetID());
}
void WebContentsDelegateQt::DidFirstVisuallyNonEmptyPaint()