Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / alternate_error_tab_observer.cc
index 21415ce..a735728 100644 (file)
 #include "chrome/common/render_messages.h"
 #include "components/user_prefs/pref_registry_syncable.h"
 #include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/web_contents.h"
 
+using content::RenderFrameHost;
 using content::RenderViewHost;
 using content::WebContents;
 
@@ -93,6 +95,7 @@ void AlternateErrorPageTabObserver::OnAlternateErrorPagesEnabledChanged() {
 
 void AlternateErrorPageTabObserver::UpdateAlternateErrorPageURL(
     RenderViewHost* rvh) {
-  rvh->Send(new ChromeViewMsg_SetAltErrorPageURL(
-                rvh->GetRoutingID(), GetAlternateErrorPageURL()));
+  RenderFrameHost* rfh = rvh->GetMainFrame();
+  rfh->Send(new ChromeViewMsg_SetAltErrorPageURL(
+                rfh->GetRoutingID(), GetAlternateErrorPageURL()));
 }