1 // Copyright 2012 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_
6 #define CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_
8 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
10 // This class is used to continue or cancel a pending reload when the
11 // repost form warning is shown. It is owned by the platform-specific
12 // |TabModalConfirmDialog{Gtk, Mac, Views, WebUI}| classes.
13 class RepostFormWarningController : public TabModalConfirmDialogDelegate {
15 explicit RepostFormWarningController(content::WebContents* web_contents);
17 RepostFormWarningController(const RepostFormWarningController&) = delete;
18 RepostFormWarningController& operator=(const RepostFormWarningController&) =
21 ~RepostFormWarningController() override;
24 // TabModalConfirmDialogDelegate methods:
25 std::u16string GetTitle() override;
26 std::u16string GetDialogMessage() override;
27 std::u16string GetAcceptButtonTitle() override;
28 void OnAccepted() override;
29 void OnCanceled() override;
30 void OnClosed() override;
32 // content::WebContentsObserver methods via TabModalConfirmDialogDelegate:
33 void BeforeFormRepostWarningShow() override;
36 #endif // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_