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

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: final comment 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
« no previous file with comments | « content/renderer/load_progress_tracker.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3045 matching lines...) Expand 10 before | Expand all | Expand 10 after
3056 3056
3057 WebElement RenderFrameImpl::GetFocusedElement() { 3057 WebElement RenderFrameImpl::GetFocusedElement() {
3058 WebDocument doc = frame_->document(); 3058 WebDocument doc = frame_->document();
3059 if (!doc.isNull()) 3059 if (!doc.isNull())
3060 return doc.focusedElement(); 3060 return doc.focusedElement();
3061 3061
3062 return WebElement(); 3062 return WebElement();
3063 } 3063 }
3064 3064
3065 void RenderFrameImpl::didStartLoading(bool to_different_document) { 3065 void RenderFrameImpl::didStartLoading(bool to_different_document) {
3066 bool view_was_loading = render_view_->is_loading();
3067 render_view_->FrameDidStartLoading(frame_); 3066 render_view_->FrameDidStartLoading(frame_);
3068 if (!view_was_loading) 3067 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document));
3069 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document));
3070 } 3068 }
3071 3069
3072 void RenderFrameImpl::didStopLoading() { 3070 void RenderFrameImpl::didStopLoading() {
3073 if (!render_view_->is_loading())
3074 return;
3075 render_view_->FrameDidStopLoading(frame_); 3071 render_view_->FrameDidStopLoading(frame_);
3076 3072 Send(new FrameHostMsg_DidStopLoading(routing_id_));
3077 // NOTE: For now we're doing the safest thing, and sending out notification
3078 // when done loading. This currently isn't an issue as the favicon is only
3079 // displayed when done loading. Ideally we would send notification when
3080 // finished parsing the head, but webkit doesn't support that yet.
3081 // The feed discovery code would also benefit from access to the head.
3082 if (!render_view_->is_loading())
3083 Send(new FrameHostMsg_DidStopLoading(routing_id_));
3084 } 3073 }
3085 3074
3086 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { 3075 void RenderFrameImpl::didChangeLoadProgress(double load_progress) {
3087 render_view_->FrameDidChangeLoadProgress(frame_, load_progress); 3076 Send(new FrameHostMsg_DidChangeLoadProgress(routing_id_, load_progress));
3088 } 3077 }
3089 3078
3090 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( 3079 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
3091 RenderFrame* render_frame, 3080 RenderFrame* render_frame,
3092 WebFrame* frame, 3081 WebFrame* frame,
3093 WebDataSource::ExtraData* extraData, 3082 WebDataSource::ExtraData* extraData,
3094 const WebURLRequest& request, 3083 const WebURLRequest& request,
3095 WebNavigationType type, 3084 WebNavigationType type,
3096 WebNavigationPolicy default_policy, 3085 WebNavigationPolicy default_policy,
3097 bool is_redirect) { 3086 bool is_redirect) {
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
3501 weak_factory_.GetWeakPtr(), 3490 weak_factory_.GetWeakPtr(),
3502 render_view_->media_player_manager_, 3491 render_view_->media_player_manager_,
3503 stream_texture_factory, 3492 stream_texture_factory,
3504 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), 3493 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(),
3505 new RenderMediaLog()); 3494 new RenderMediaLog());
3506 } 3495 }
3507 3496
3508 #endif 3497 #endif
3509 3498
3510 } // namespace content 3499 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/load_progress_tracker.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698