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

Unified Diff: chrome/browser/prerender/prerender_contents.cc

Issue 373623002: Convert remaining WebContentsObservers loading callbacks to use RFH. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix one more compile error Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prerender/prerender_contents.cc
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index 672ec3c8903bcb44dc4feb502cd2559999375fd6..85f2c9e4da2beea357445cec78dbe8527fd11eb2 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -240,7 +240,6 @@ PrerenderContents::PrerenderContents(
origin_(origin),
experiment_id_(experiment_id),
creator_child_id_(-1),
- main_frame_id_(0),
cookie_status_(0),
cookie_send_type_(COOKIE_SEND_TYPE_NONE),
network_bytes_(0) {
@@ -620,9 +619,8 @@ void PrerenderContents::DidStopLoading(
}
void PrerenderContents::DocumentLoadedInFrame(
- int64 frame_id,
- RenderViewHost* render_view_host) {
- if (frame_id == main_frame_id_)
+ content::RenderFrameHost* render_frame_host) {
+ if (!render_frame_host->GetParent())
NotifyPrerenderDomContentLoaded();
}
@@ -645,20 +643,10 @@ void PrerenderContents::DidStartProvisionalLoadForFrame(
}
}
-void PrerenderContents::DidCommitProvisionalLoadForFrame(
+void PrerenderContents::DidFinishLoad(
content::RenderFrameHost* render_frame_host,
- const GURL& url,
- content::PageTransition transition_type) {
- if (!render_frame_host->GetParent()) {
- main_frame_id_ = render_frame_host->GetRoutingID();
- }
-}
-
-void PrerenderContents::DidFinishLoad(int64 frame_id,
- const GURL& validated_url,
- bool is_main_frame,
- RenderViewHost* render_view_host) {
- if (is_main_frame)
+ const GURL& validated_url) {
+ if (!render_frame_host->GetParent())
has_finished_loading_ = true;
}
« no previous file with comments | « chrome/browser/prerender/prerender_contents.h ('k') | chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698