blob: 9468bdf7e324fbdc06e64c2c41c3f3a2b12a5335 [file] [log] [blame]
// 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.
#include "build/build_config.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 TabModalConfirmDialogCloseDelegate {
// Platform specific factory function. This function will automatically show
// the dialog.
static TabModalConfirmDialog* Create(TabModalConfirmDialogDelegate* delegate,
content::WebContents* web_contents);
#if defined(OS_MACOSX)
// Temporary shim for Polychrome. See bottom of first comment in
// for details.
static TabModalConfirmDialog* CreateCocoa(
TabModalConfirmDialogDelegate* delegate,
content::WebContents* web_contents);
// Accepts the dialog.
virtual void AcceptTabModalDialog() = 0;
// Cancels the dialog.
virtual void CancelTabModalDialog() = 0;
// TabModalConfirmDialogCloseDelegate:
// Closes the dialog.
void CloseDialog() override = 0;
~TabModalConfirmDialog() override {}