| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index d6d922d96be90d58192fdb5d3a85fb791701f115..13c7ec82e6589c8248041967ef16ee5e28608496 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -39,6 +39,7 @@
|
| #include "content/public/common/context_menu_params.h"
|
| #include "content/public/common/url_constants.h"
|
| #include "content/public/common/url_utils.h"
|
| +#include "content/public/common/widget_visible_state.h"
|
| #include "content/public/renderer/content_renderer_client.h"
|
| #include "content/public/renderer/context_menu_client.h"
|
| #include "content/public/renderer/document_state.h"
|
| @@ -1974,6 +1975,11 @@ void RenderFrameImpl::didCommitProvisionalLoad(
|
|
|
| // Check whether we have new encoding name.
|
| UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
|
| +
|
| + if (!frame->parent()) {
|
| + GetRenderWidget()->QueueMessage(new FrameHostMsg_WidgetVisibleStateChanged(
|
| + routing_id_, WIDGET_VISIBLE_STATE_DID_HANDLE_ONLOAD_EVENTS));
|
| + }
|
| }
|
|
|
| void RenderFrameImpl::didClearWindowObject(blink::WebLocalFrame* frame) {
|
| @@ -2050,12 +2056,21 @@ void RenderFrameImpl::didFinishDocumentLoad(blink::WebLocalFrame* frame) {
|
|
|
| // Check whether we have new encoding name.
|
| UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
|
| +
|
| + if (!frame->parent()) {
|
| + GetRenderWidget()->QueueMessage(new FrameHostMsg_WidgetVisibleStateChanged(
|
| + routing_id_, WIDGET_VISIBLE_STATE_DID_FINISH_DOCUMENT_LOAD));
|
| + }
|
| }
|
|
|
| void RenderFrameImpl::didHandleOnloadEvents(blink::WebLocalFrame* frame) {
|
| DCHECK(!frame_ || frame_ == frame);
|
| - if (!frame->parent())
|
| + if (!frame->parent()) {
|
| Send(new FrameHostMsg_DocumentOnLoadCompleted(routing_id_));
|
| +
|
| + GetRenderWidget()->QueueMessage(new FrameHostMsg_WidgetVisibleStateChanged(
|
| + routing_id_, WIDGET_VISIBLE_STATE_DID_HANDLE_ONLOAD_EVENTS));
|
| + }
|
| }
|
|
|
| void RenderFrameImpl::didFailLoad(blink::WebLocalFrame* frame,
|
| @@ -2611,6 +2626,11 @@ void RenderFrameImpl::didFirstVisuallyNonEmptyLayout(
|
| GetRenderWidget()->DidChangeBodyBackgroundColor(
|
| render_view_->webwidget_->backgroundColor());
|
| #endif
|
| +
|
| + if (!frame->parent()) {
|
| + GetRenderWidget()->QueueMessage(new FrameHostMsg_WidgetVisibleStateChanged(
|
| + routing_id_, WIDGET_VISIBLE_STATE_FIRST_VISUALLY_NON_EMPTY_LAYOUT));
|
| + }
|
| }
|
|
|
| void RenderFrameImpl::didChangeContentsSize(blink::WebLocalFrame* frame,
|
|
|