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

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: Review comments addressed 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..251b1ef12db24401d1e3e63d6272c17cc7c18de7 100644
--- a/Source/web/WebFrameWidgetImpl.cpp
+++ b/Source/web/WebFrameWidgetImpl.cpp
@@ -1014,4 +1014,18 @@ void WebFrameWidgetImpl::setRootGraphicsLayer(GraphicsLayer* layer)
suppressInvalidations(false);
}
+void WebFrameWidgetImpl::setVisibilityState(WebPageVisibilityState visibilityState, bool isInitialState)
+{
+ if (!m_page)
+ return;
+
+ ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState == WebPageVisibilityStateHidden || visibilityState == WebPageVisibilityStatePrerender);
Nate Chapin 2015/02/26 21:16:34 I agree this is wonky, but if there's precedent, I
kenrb 2015/02/26 22:29:56 Or, I could just remove it. There is nothing I can
+ m_page->setVisibilityState(static_cast<PageVisibilityState>(visibilityState), isInitialState);
Nate Chapin 2015/02/26 21:16:34 Just to make sure I understand correctly, setVisib
kenrb 2015/02/26 22:29:56 Aha, no. :( This is what I was talking about befo
+
+ 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