diff options
-rw-r--r-- | chrome/browser/external_tab_container_win.cc | 6 | ||||
-rw-r--r-- | chrome/browser/external_tab_container_win.h | 2 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc index f254816..2c2ae78 100644 --- a/chrome/browser/external_tab_container_win.cc +++ b/chrome/browser/external_tab_container_win.cc @@ -29,6 +29,7 @@ #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "chrome/browser/tab_contents/provisional_load_details.h" #include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/browser/views/browser_dialogs.h" #include "chrome/browser/views/page_info_bubble_view.h" #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h" #include "chrome/browser/views/tab_contents/tab_contents_container.h" @@ -702,6 +703,11 @@ void ExternalTabContainer::BeforeUnloadFired(TabContents* tab, } } +void ExternalTabContainer::ShowRepostFormWarningDialog( + TabContents* tab_contents) { + browser::ShowRepostFormWarningDialog(GetNativeView(), tab_contents); +} + //////////////////////////////////////////////////////////////////////////////// // ExternalTabContainer, NotificationObserver implementation: diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h index cc0e35c..9821c4b 100644 --- a/chrome/browser/external_tab_container_win.h +++ b/chrome/browser/external_tab_container_win.h @@ -173,6 +173,8 @@ class ExternalTabContainer : public TabContentsDelegate, bool proceed, bool* proceed_to_fire_unload); + void ShowRepostFormWarningDialog(TabContents* tab_contents); + // Overriden from TabContentsDelegate::AutomationResourceRoutingDelegate virtual void RegisterRenderViewHost(RenderViewHost* render_view_host); virtual void UnregisterRenderViewHost(RenderViewHost* render_view_host); diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index c900173..d3fe814 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -5621,9 +5621,10 @@ bool RenderView::IsNonLocalTopLevelNavigation( if (!url.SchemeIs("http") && !url.SchemeIs("https")) return false; - // Not interested in reloads. + // Not interested in reloads/form submits/resubmits/back forward navigations. if (type != WebKit::WebNavigationTypeReload && type != WebKit::WebNavigationTypeFormSubmitted && + type != WebKit::WebNavigationTypeFormResubmitted && type != WebKit::WebNavigationTypeBackForward) { // The opener relationship between the new window and the parent allows the // new window to script the parent and vice versa. This is not allowed if |