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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 263973003: Move LoadProgressTracker to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: recomment 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3006 matching lines...) Expand 10 before | Expand all | Expand 10 after
3017 3017
3018 WebElement RenderFrameImpl::GetFocusedElement() { 3018 WebElement RenderFrameImpl::GetFocusedElement() {
3019 WebDocument doc = frame_->document(); 3019 WebDocument doc = frame_->document();
3020 if (!doc.isNull()) 3020 if (!doc.isNull())
3021 return doc.focusedElement(); 3021 return doc.focusedElement();
3022 3022
3023 return WebElement(); 3023 return WebElement();
3024 } 3024 }
3025 3025
3026 void RenderFrameImpl::didStartLoading(bool to_different_document) { 3026 void RenderFrameImpl::didStartLoading(bool to_different_document) {
3027 bool view_was_loading = render_view_->is_loading();
3028 render_view_->FrameDidStartLoading(frame_); 3027 render_view_->FrameDidStartLoading(frame_);
3029 if (!view_was_loading) 3028 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document));
3030 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document));
3031 } 3029 }
3032 3030
3033 void RenderFrameImpl::didStopLoading() { 3031 void RenderFrameImpl::didStopLoading() {
3034 if (!render_view_->is_loading())
3035 return;
3036 render_view_->FrameDidStopLoading(frame_); 3032 render_view_->FrameDidStopLoading(frame_);
3037 3033 Send(new FrameHostMsg_DidStopLoading(routing_id_));
3038 // NOTE: For now we're doing the safest thing, and sending out notification
3039 // when done loading. This currently isn't an issue as the favicon is only
3040 // displayed when done loading. Ideally we would send notification when
3041 // finished parsing the head, but webkit doesn't support that yet.
3042 // The feed discovery code would also benefit from access to the head.
3043 if (!render_view_->is_loading())
3044 Send(new FrameHostMsg_DidStopLoading(routing_id_));
3045 } 3034 }
3046 3035
3047 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { 3036 void RenderFrameImpl::didChangeLoadProgress(double load_progress) {
3048 render_view_->FrameDidChangeLoadProgress(frame_, load_progress); 3037 Send(new FrameHostMsg_DidChangeLoadProgress(routing_id_, load_progress));
3049 } 3038 }
3050 3039
3051 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( 3040 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
3052 RenderFrame* render_frame, 3041 RenderFrame* render_frame,
3053 WebFrame* frame, 3042 WebFrame* frame,
3054 WebDataSource::ExtraData* extraData, 3043 WebDataSource::ExtraData* extraData,
3055 const WebURLRequest& request, 3044 const WebURLRequest& request,
3056 WebNavigationType type, 3045 WebNavigationType type,
3057 WebNavigationPolicy default_policy, 3046 WebNavigationPolicy default_policy,
3058 bool is_redirect) { 3047 bool is_redirect) {
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
3462 weak_factory_.GetWeakPtr(), 3451 weak_factory_.GetWeakPtr(),
3463 render_view_->media_player_manager_, 3452 render_view_->media_player_manager_,
3464 stream_texture_factory, 3453 stream_texture_factory,
3465 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), 3454 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(),
3466 new RenderMediaLog()); 3455 new RenderMediaLog());
3467 } 3456 }
3468 3457
3469 #endif 3458 #endif
3470 3459
3471 } // namespace content 3460 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698