- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / download / download_in_progress_dialog_view.h
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.
4
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_
7
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"
12
13 namespace views {
14 class MessageBoxView;
15 }
16
17 class DownloadInProgressDialogView : public views::DialogDelegate {
18  public:
19   static void Show(gfx::NativeWindow parent_window,
20                    int download_count,
21                    Browser::DownloadClosePreventionType dialog_type,
22                    bool app_modal,
23                    const base::Callback<void(bool)>& callback);
24
25  private:
26   DownloadInProgressDialogView(int download_count,
27                                Browser::DownloadClosePreventionType dialog_type,
28                                bool app_modal,
29                                const base::Callback<void(bool)>& callback);
30   virtual ~DownloadInProgressDialogView();
31
32   // views::DialogDelegate:
33   virtual int GetDefaultDialogButton() const OVERRIDE;
34   virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE;
35   virtual bool Cancel() OVERRIDE;
36   virtual bool Accept() OVERRIDE;
37
38   // views::WidgetDelegate:
39   virtual ui::ModalType GetModalType() const OVERRIDE;
40   virtual string16 GetWindowTitle() const OVERRIDE;
41   virtual void DeleteDelegate() OVERRIDE;
42   virtual views::Widget* GetWidget() OVERRIDE;
43   virtual const views::Widget* GetWidget() const OVERRIDE;
44   virtual views::View* GetContentsView() OVERRIDE;
45
46   const bool app_modal_;
47   const base::Callback<void(bool)> callback_;
48   views::MessageBoxView* message_box_view_;
49
50   string16 title_text_;
51   string16 ok_button_text_;
52   string16 cancel_button_text_;
53
54   gfx::Size dialog_dimensions_;
55
56   DISALLOW_COPY_AND_ASSIGN(DownloadInProgressDialogView);
57 };
58
59 #endif  // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_