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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't use metadata to stash IPC messages Created 6 years, 7 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index b02984b877e81175d44226033125e7bff05f4c42..3e0407ed6b2f2f913650e35f660d0a26c2aff40d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -510,6 +510,8 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
OnMediaPlayingNotification)
IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPausedNotification,
OnMediaPausedNotification)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_WidgetVisibleStateChanged,
+ OnWidgetVisibleStateChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidLoadResourceFromMemoryCache,
OnDidLoadResourceFromMemoryCache)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidDisplayInsecureContent,
@@ -1692,6 +1694,15 @@ void WebContentsImpl::OnMoveValidationMessage(
delegate_->MoveValidationMessage(this, anchor_in_root_view);
}
+void WebContentsImpl::OnWidgetVisibleStateChanged(
+ WidgetVisibleState widget_visible_state) {
+ if (widget_visible_state ==
+ WIDGET_VISIBLE_STATE_FIRST_VISUALLY_NON_EMPTY_LAYOUT) {
+ FOR_EACH_OBSERVER(
+ WebContentsObserver, observers_, DidFirstVisuallyNonEmptyPaint());
+ }
+}
+
void WebContentsImpl::DidSendScreenRects(RenderWidgetHostImpl* rwh) {
if (browser_plugin_embedder_)
browser_plugin_embedder_->DidSendScreenRects();

Powered by Google App Engine
This is Rietveld 408576698