Chromium Code Reviews| 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 b27d4c18054559bae0f200ac560483fec23d364b..3fb6d5049054d4252ec4d9817bbbd754e970daf9 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -1294,6 +1294,16 @@ gfx::NativeViewAccessible WebContentsImpl::GetParentNativeViewAccessible() { |
| } |
| #endif |
| +void WebContentsImpl::DispatchMessageWithSwapFrame(const IPC::Message&) { |
|
mkosiba (inactive)
2014/05/06 22:30:33
the web contents would just re-broadcast to all of
|
| + ObserverListBase<WebContentsObserver>::Iterator it(observers_); |
| + WebContentsObserver* observer; |
| + while ((observer = it.GetNext()) != NULL) { |
| + // Would it be better to just call observer->OnMessageReceived? |
| + if (observer->DispatchMessageWithSwapFrame(message)) |
| + return true; |
| + } |
| +} |
| + |
| void WebContentsImpl::HandleMouseDown() { |
| if (delegate_) |
| delegate_->HandleMouseDown(); |
| @@ -2843,8 +2853,6 @@ void WebContentsImpl::OnMediaPausedNotification(int64 player_cookie) { |
| } |
| void WebContentsImpl::OnFirstVisuallyNonEmptyPaint(int32 page_id) { |
| - FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| - DidFirstVisuallyNonEmptyPaint(page_id)); |
| } |
| void WebContentsImpl::DidChangeVisibleSSLState() { |
| @@ -3865,6 +3873,17 @@ bool WebContentsImpl::IsHidden() { |
| return capturer_count_ == 0 && !should_normally_be_visible_; |
| } |
| +void WebContentsImpl::WidgetVisibleStateChanged( |
| + int32 page_id, |
| + WidgetVisibleState widget_visible_state) { |
| + if (widget_visible_state == |
| + WIDGET_VISIBLE_STATE_FIRST_VISUALLY_NON_EMPTY_LAYOUT) { |
| + FOR_EACH_OBSERVER(WebContentsObserver, |
| + observers_, |
| + DidFirstVisuallyNonEmptyPaint(page_id)); |
| + } |
| +} |
| + |
| RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { |
| return frame_tree_.root()->render_manager(); |
| } |