1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/ui/browser.h"
11 #include "ui/views/window/dialog_delegate.h"
17 class DownloadInProgressDialogView
: public views::DialogDelegate
{
19 static void Show(gfx::NativeWindow parent_window
,
21 Browser::DownloadClosePreventionType dialog_type
,
23 const base::Callback
<void(bool)>& callback
);
26 DownloadInProgressDialogView(int download_count
,
27 Browser::DownloadClosePreventionType dialog_type
,
29 const base::Callback
<void(bool)>& callback
);
30 ~DownloadInProgressDialogView() override
;
32 // views::DialogDelegate:
33 int GetDefaultDialogButton() const override
;
34 base::string16
GetDialogButtonLabel(ui::DialogButton button
) const override
;
35 bool Cancel() override
;
36 bool Accept() override
;
38 // views::WidgetDelegate:
39 ui::ModalType
GetModalType() const override
;
40 base::string16
GetWindowTitle() const override
;
41 void DeleteDelegate() override
;
42 views::Widget
* GetWidget() override
;
43 const views::Widget
* GetWidget() const override
;
44 views::View
* GetContentsView() override
;
46 const bool app_modal_
;
47 const base::Callback
<void(bool)> callback_
;
48 views::MessageBoxView
* message_box_view_
;
50 base::string16 title_text_
;
51 base::string16 ok_button_text_
;
52 base::string16 cancel_button_text_
;
54 gfx::Size dialog_dimensions_
;
56 DISALLOW_COPY_AND_ASSIGN(DownloadInProgressDialogView
);
59 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_