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

Unified Diff: components/dom_distiller/content/distiller_page_web_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 CrOS test 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: components/dom_distiller/content/distiller_page_web_contents.cc
diff --git a/components/dom_distiller/content/distiller_page_web_contents.cc b/components/dom_distiller/content/distiller_page_web_contents.cc
index 527c0eb96de769d0e2324ac0611b3315d9c80b4d..41187eb2b88cd63044797c7e10f6e3be814f4025 100644
--- a/components/dom_distiller/content/distiller_page_web_contents.cc
+++ b/components/dom_distiller/content/distiller_page_web_contents.cc
@@ -108,21 +108,18 @@ void DistillerPageWebContents::CreateNewWebContents(const GURL& url) {
}
void DistillerPageWebContents::DocumentLoadedInFrame(
- int64 frame_id,
- RenderViewHost* render_view_host) {
- if (frame_id == web_contents_->GetMainFrame()->GetRoutingID()) {
+ content::RenderFrameHost* render_frame_host) {
+ if (render_frame_host == web_contents_->GetMainFrame()) {
ExecuteJavaScript();
}
}
void DistillerPageWebContents::DidFailLoad(
- int64 frame_id,
+ content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
- bool is_main_frame,
int error_code,
- const base::string16& error_description,
- RenderViewHost* render_view_host) {
- if (is_main_frame) {
+ const base::string16& error_description) {
+ if (!render_frame_host->GetParent()) {
content::WebContentsObserver::Observe(NULL);
DCHECK(state_ == LOADING_PAGE || state_ == EXECUTING_JAVASCRIPT);
state_ = PAGELOAD_FAILED;

Powered by Google App Engine
This is Rietveld 408576698