Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: Source/web/WebFrameWidgetImpl.cpp

Issue 955143002: Add setVisibilityState API to WebFrameWidget (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another comment update Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebFrameWidgetImpl.h ('k') | public/web/WebFrameWidget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameWidgetImpl.cpp
diff --git a/Source/web/WebFrameWidgetImpl.cpp b/Source/web/WebFrameWidgetImpl.cpp
index df861ab42c9374debbbb3dc1fdb3eef2367b3741..750721cad70faded57c099858860ab151a1ba9a9 100644
--- a/Source/web/WebFrameWidgetImpl.cpp
+++ b/Source/web/WebFrameWidgetImpl.cpp
@@ -1014,4 +1014,19 @@ void WebFrameWidgetImpl::setRootGraphicsLayer(GraphicsLayer* layer)
suppressInvalidations(false);
}
+void WebFrameWidgetImpl::setVisibilityState(WebPageVisibilityState visibilityState, bool isInitialState)
+{
+ if (!m_page)
+ return;
+
+ // FIXME: This is not correct, since Show and Hide messages for a frame's Widget do not necessarily
+ // correspond to Page visibility, but is necessary until we properly sort out OOPIF visibility.
+ m_page->setVisibilityState(static_cast<PageVisibilityState>(visibilityState), isInitialState);
+
+ if (m_layerTreeView) {
+ bool visible = visibilityState == WebPageVisibilityStateVisible;
+ m_layerTreeView->setVisible(visible);
+ }
+}
+
} // namespace blink
« no previous file with comments | « Source/web/WebFrameWidgetImpl.h ('k') | public/web/WebFrameWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698