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

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: yep 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 2943 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 2954
2955 WebElement RenderFrameImpl::GetFocusedElement() { 2955 WebElement RenderFrameImpl::GetFocusedElement() {
2956 WebDocument doc = frame_->document(); 2956 WebDocument doc = frame_->document();
2957 if (!doc.isNull()) 2957 if (!doc.isNull())
2958 return doc.focusedElement(); 2958 return doc.focusedElement();
2959 2959
2960 return WebElement(); 2960 return WebElement();
2961 } 2961 }
2962 2962
2963 void RenderFrameImpl::didStartLoading(bool to_different_document) { 2963 void RenderFrameImpl::didStartLoading(bool to_different_document) {
2964 bool view_was_loading = render_view_->is_loading();
2965 render_view_->FrameDidStartLoading(frame_); 2964 render_view_->FrameDidStartLoading(frame_);
2966 if (!view_was_loading) 2965 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document));
2967 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document));
2968 } 2966 }
2969 2967
2970 void RenderFrameImpl::didStopLoading() { 2968 void RenderFrameImpl::didStopLoading() {
2971 if (!render_view_->is_loading())
2972 return;
2973 render_view_->FrameDidStopLoading(frame_); 2969 render_view_->FrameDidStopLoading(frame_);
2974 2970 Send(new FrameHostMsg_DidStopLoading(routing_id_));
2975 // NOTE: For now we're doing the safest thing, and sending out notification
2976 // when done loading. This currently isn't an issue as the favicon is only
2977 // displayed when done loading. Ideally we would send notification when
2978 // finished parsing the head, but webkit doesn't support that yet.
2979 // The feed discovery code would also benefit from access to the head.
2980 if (!render_view_->is_loading())
2981 Send(new FrameHostMsg_DidStopLoading(routing_id_));
2982 } 2971 }
2983 2972
2984 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { 2973 void RenderFrameImpl::didChangeLoadProgress(double load_progress) {
2985 render_view_->FrameDidChangeLoadProgress(frame_, load_progress); 2974 Send(new FrameHostMsg_DidChangeLoadProgress(routing_id_, load_progress));
2986 } 2975 }
2987 2976
2988 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( 2977 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
2989 RenderFrame* render_frame, 2978 RenderFrame* render_frame,
2990 WebFrame* frame, 2979 WebFrame* frame,
2991 WebDataSource::ExtraData* extraData, 2980 WebDataSource::ExtraData* extraData,
2992 const WebURLRequest& request, 2981 const WebURLRequest& request,
2993 WebNavigationType type, 2982 WebNavigationType type,
2994 WebNavigationPolicy default_policy, 2983 WebNavigationPolicy default_policy,
2995 bool is_redirect) { 2984 bool is_redirect) {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
3392 weak_factory_.GetWeakPtr(), 3381 weak_factory_.GetWeakPtr(),
3393 render_view_->media_player_manager_, 3382 render_view_->media_player_manager_,
3394 stream_texture_factory, 3383 stream_texture_factory,
3395 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), 3384 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(),
3396 new RenderMediaLog()); 3385 new RenderMediaLog());
3397 } 3386 }
3398 3387
3399 #endif 3388 #endif
3400 3389
3401 } // namespace content 3390 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698