| Index: content/renderer/render_view_impl.cc
|
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
| index c2c707bd71ccd2c12c74a6964e098cf1213f0625..9570cab80e7824256464d19618e4a968c20b85a7 100644
|
| --- a/content/renderer/render_view_impl.cc
|
| +++ b/content/renderer/render_view_impl.cc
|
| @@ -757,7 +757,6 @@ RenderViewImpl::RenderViewImpl(RenderViewImplParams* params)
|
| send_content_state_immediately_(false),
|
| enabled_bindings_(0),
|
| send_preferred_size_changes_(false),
|
| - is_loading_(false),
|
| navigation_gesture_(NavigationGestureUnknown),
|
| opened_by_user_gesture_(true),
|
| opener_suppressed_(false),
|
| @@ -2180,42 +2179,27 @@ bool RenderViewImpl::enumerateChosenDirectory(
|
| }
|
|
|
| void RenderViewImpl::didStartLoading(bool to_different_document) {
|
| - didStartLoading();
|
| + main_render_frame_->didStartLoading(to_different_document);
|
| }
|
|
|
| -void RenderViewImpl::didStartLoading() {
|
| - if (is_loading_) {
|
| - DVLOG(1) << "didStartLoading called while loading";
|
| - return;
|
| - }
|
| -
|
| - is_loading_ = true;
|
| -
|
| - // Send the IPC message through the top-level frame.
|
| - main_render_frame_->didStartLoading();
|
| +void RenderViewImpl::didStopLoading() {
|
| + main_render_frame_->didStopLoading();
|
| +}
|
|
|
| +void RenderViewImpl::didStartLoading(WebFrame* frame) {
|
| + if (load_progress_tracker_ != NULL) {
|
| + load_progress_tracker_->DidStartLoading(
|
| + RenderFrameImpl::FromWebFrame(frame));
|
| + }
|
| FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStartLoading());
|
| }
|
|
|
| -void RenderViewImpl::didStopLoading() {
|
| - if (!is_loading_) {
|
| - DVLOG(1) << "DidStopLoading called while not loading";
|
| - return;
|
| +void RenderViewImpl::didStopLoading(WebFrame* frame) {
|
| + if (load_progress_tracker_ != NULL) {
|
| + load_progress_tracker_->DidStopLoading(
|
| + RenderFrameImpl::FromWebFrame(frame));
|
| }
|
|
|
| - is_loading_ = false;
|
| -
|
| - // NOTE: For now we're doing the safest thing, and sending out notification
|
| - // when done loading. This currently isn't an issue as the favicon is only
|
| - // displayed when done loading. Ideally we would send notification when
|
| - // finished parsing the head, but webkit doesn't support that yet.
|
| - // The feed discovery code would also benefit from access to the head.
|
| - // NOTE: Sending of the IPC message happens through the top-level frame.
|
| - main_render_frame_->didStopLoading();
|
| -
|
| - if (load_progress_tracker_ != NULL)
|
| - load_progress_tracker_->DidStopLoading();
|
| -
|
| DidStopLoadingIcons();
|
|
|
| FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStopLoading());
|
| @@ -2223,8 +2207,10 @@ void RenderViewImpl::didStopLoading() {
|
|
|
| void RenderViewImpl::didChangeLoadProgress(WebFrame* frame,
|
| double load_progress) {
|
| - if (load_progress_tracker_ != NULL)
|
| - load_progress_tracker_->DidChangeLoadProgress(frame, load_progress);
|
| + if (load_progress_tracker_ != NULL) {
|
| + load_progress_tracker_->DidChangeLoadProgress(
|
| + RenderFrameImpl::FromWebFrame(frame), load_progress);
|
| + }
|
| }
|
|
|
| void RenderViewImpl::didCancelCompositionOnSelectionChange() {
|
| @@ -3819,11 +3805,11 @@ void RenderViewImpl::RunModalAlertDialog(blink::WebFrame* frame,
|
| }
|
|
|
| void RenderViewImpl::DidStartLoading() {
|
| - didStartLoading();
|
| + main_render_frame_->didStartLoading(true);
|
| }
|
|
|
| void RenderViewImpl::DidStopLoading() {
|
| - didStopLoading();
|
| + main_render_frame_->didStopLoading();
|
| }
|
|
|
| void RenderViewImpl::DidPlay(blink::WebMediaPlayer* player) {
|
|
|