[M120 Migration]Fix for crash during chrome exit
[platform/framework/web/chromium-efl.git] / chrome / browser / repost_form_warning_controller.h
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.
4
5 #ifndef CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_
6 #define CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_
7
8 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
9
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 {
14  public:
15   explicit RepostFormWarningController(content::WebContents* web_contents);
16
17   RepostFormWarningController(const RepostFormWarningController&) = delete;
18   RepostFormWarningController& operator=(const RepostFormWarningController&) =
19       delete;
20
21   ~RepostFormWarningController() override;
22
23  private:
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;
31
32   // content::WebContentsObserver methods via TabModalConfirmDialogDelegate:
33   void BeforeFormRepostWarningShow() override;
34 };
35
36 #endif  // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_