diff options
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/navigation_controller.cc | 9 | ||||
-rw-r--r-- | chrome/browser/tab_contents/repost_form_warning.h | 17 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.h | 3 |
3 files changed, 5 insertions, 24 deletions
diff --git a/chrome/browser/tab_contents/navigation_controller.cc b/chrome/browser/tab_contents/navigation_controller.cc index 3704169..7f5fa99 100644 --- a/chrome/browser/tab_contents/navigation_controller.cc +++ b/chrome/browser/tab_contents/navigation_controller.cc @@ -16,8 +16,8 @@ #include "chrome/browser/renderer_host/site_instance.h" #include "chrome/browser/sessions/session_types.h" #include "chrome/browser/tab_contents/navigation_entry.h" -#include "chrome/browser/tab_contents/repost_form_warning.h" #include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/browser/tab_contents/tab_contents_delegate.h" #include "chrome/common/navigation_types.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" @@ -29,11 +29,6 @@ #include "net/base/net_util.h" #include "webkit/glue/webkit_glue.h" -#if defined(OS_WIN) -#include "chrome/browser/tab_contents/repost_form_warning.h" -#include "chrome/browser/tab_contents/tab_contents_delegate.h" -#endif - namespace { // Invoked when entries have been pruned, or removed. For example, if the @@ -173,7 +168,7 @@ void NavigationController::Reload(bool check_for_repost) { // they really want to do this. If they do, the dialog will call us back // with check_for_repost = false. tab_contents_->Activate(); - RunRepostFormWarningDialog(this); + tab_contents_->delegate()->ShowRepostFormWarningDialog(tab_contents_); } else { // Base the navigation on where we are now... int current_index = GetCurrentEntryIndex(); diff --git a/chrome/browser/tab_contents/repost_form_warning.h b/chrome/browser/tab_contents/repost_form_warning.h deleted file mode 100644 index 9bbbbaa..0000000 --- a/chrome/browser/tab_contents/repost_form_warning.h +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_ -#define CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_ - -class NavigationController; - -// Runs the form repost warning dialog. If the user accepts the action, then -// it will call Reload on the navigation controller back with check_for_repost -// set to false. -// -// This function is implemented by the platform-specific frontend. -void RunRepostFormWarningDialog(NavigationController* nav_controller); - -#endif // CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_ diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h index 3799569..156bb18 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.h +++ b/chrome/browser/tab_contents/tab_contents_delegate.h @@ -221,6 +221,9 @@ class TabContentsDelegate { return false; } + // Shows the repost form confirmation dialog box. + virtual void ShowRepostFormWarningDialog(TabContents* tab_contents) {} + protected: ~TabContentsDelegate() {} |