summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/tab_modal_confirm_dialog.h
blob: 838e70527b781bf7e786d11ffdd7c0850a7c8909 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2012 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_UI_TAB_MODAL_CONFIRM_DIALOG_H_
#define CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_H_

#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"

namespace content {
class WebContents;
}

// Base class for the tab modal confirm dialog.
class TabModalConfirmDialog : public TabModalConfirmDialogOperationsDelegate {
 public:
  // Platform specific factory function. This function will automatically show
  // the dialog.
  static TabModalConfirmDialog* Create(TabModalConfirmDialogDelegate* delegate,
                                       content::WebContents* web_contents);
  // Accepts the dialog.
  virtual void AcceptTabModalDialog() = 0;

  // Cancels the dialog.
  virtual void CancelTabModalDialog() = 0;

  // TabModalConfirmDialogOperationsDelegate:
  // Closes the dialog.
  virtual void CloseDialog() = 0;
  // Prevents the dialog from closing on WebContents load start.
  virtual void SetPreventCloseOnLoadStart(bool prevent) = 0;

 protected:
  virtual ~TabModalConfirmDialog() {}
};

#endif  // CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_H_