blob: 1510955233e6e6975568e6391c03f7d685e2ba54 [file] [log] [blame]
[email protected]1237c0d52012-05-25 21:37:321// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]965bb092010-04-09 11:59:022// 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
[email protected]49fd7e22011-11-21 16:52:218#include "base/compiler_specific.h"
avib896c712015-12-26 02:10:439#include "base/macros.h"
[email protected]67baffc82011-12-19 18:03:0710#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
[email protected]17e286e2013-03-01 23:29:3911#include "content/public/browser/web_contents_observer.h"
[email protected]965bb092010-04-09 11:59:0212
13// This class is used to continue or cancel a pending reload when the
[email protected]1237c0d52012-05-25 21:37:3214// repost form warning is shown. It is owned by the platform-specific
15// |TabModalConfirmDialog{Gtk, Mac, Views, WebUI}| classes.
[email protected]17e286e2013-03-01 23:29:3916class RepostFormWarningController : public TabModalConfirmDialogDelegate,
17 public content::WebContentsObserver {
[email protected]965bb092010-04-09 11:59:0218 public:
[email protected]2a6bc3e2011-12-28 23:51:3319 explicit RepostFormWarningController(content::WebContents* web_contents);
Daniel Chenga542fca2014-10-21 09:51:2920 ~RepostFormWarningController() override;
[email protected]965bb092010-04-09 11:59:0221
[email protected]17e286e2013-03-01 23:29:3922 private:
[email protected]67baffc82011-12-19 18:03:0723 // TabModalConfirmDialogDelegate methods:
Daniel Chenga542fca2014-10-21 09:51:2924 base::string16 GetTitle() override;
25 base::string16 GetDialogMessage() override;
26 base::string16 GetAcceptButtonTitle() override;
27 void OnAccepted() override;
28 void OnCanceled() override;
29 void OnClosed() override;
[email protected]9d4984e2011-08-24 19:16:0230
[email protected]17e286e2013-03-01 23:29:3931 // content::WebContentsObserver methods:
Daniel Chenga542fca2014-10-21 09:51:2932 void BeforeFormRepostWarningShow() override;
[email protected]965bb092010-04-09 11:59:0233
34 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController);
35};
36
37#endif // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_