blob: 6fe6f6fc2657df093d0412cec23d0cbb3c39c9f8 [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_
[email protected]965bb092010-04-09 11:59:027
[email protected]49fd7e22011-11-21 16:52:218#include "base/compiler_specific.h"
[email protected]67baffc82011-12-19 18:03:079#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
[email protected]17e286e2013-03-01 23:29:3910#include "content/public/browser/web_contents_observer.h"
[email protected]965bb092010-04-09 11:59:0211
12// This class is used to continue or cancel a pending reload when the
[email protected]1237c0d52012-05-25 21:37:3213// repost form warning is shown. It is owned by the platform-specific
14// |TabModalConfirmDialog{Gtk, Mac, Views, WebUI}| classes.
[email protected]17e286e2013-03-01 23:29:3915class RepostFormWarningController : public TabModalConfirmDialogDelegate,
16 public content::WebContentsObserver {
[email protected]965bb092010-04-09 11:59:0217 public:
[email protected]2a6bc3e2011-12-28 23:51:3318 explicit RepostFormWarningController(content::WebContents* web_contents);
[email protected]b535bf1e2010-04-14 16:19:4019 virtual ~RepostFormWarningController();
[email protected]965bb092010-04-09 11:59:0220
[email protected]17e286e2013-03-01 23:29:3921 private:
[email protected]67baffc82011-12-19 18:03:0722 // TabModalConfirmDialogDelegate methods:
mostynbfb66cb4f2014-10-07 09:15:4223 virtual base::string16 GetTitle() override;
24 virtual base::string16 GetDialogMessage() override;
25 virtual base::string16 GetAcceptButtonTitle() override;
26 virtual void OnAccepted() override;
27 virtual void OnCanceled() override;
28 virtual void OnClosed() override;
[email protected]9d4984e2011-08-24 19:16:0229
[email protected]17e286e2013-03-01 23:29:3930 // content::WebContentsObserver methods:
mostynbfb66cb4f2014-10-07 09:15:4231 virtual void BeforeFormRepostWarningShow() override;
[email protected]965bb092010-04-09 11:59:0232
33 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController);
34};
35
36#endif // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_