OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_ | 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_ | 6 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "ui/views/window/dialog_delegate.h" | 11 #include "ui/views/window/dialog_delegate.h" |
12 | 12 |
13 class Browser; | 13 class Browser; |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 class Label; | 16 class MessageBoxView; |
17 } | 17 } |
18 | 18 |
19 class DownloadInProgressDialogView : public views::DialogDelegateView { | 19 class DownloadInProgressDialogView : public views::DialogDelegate { |
20 public: | 20 public: |
21 static void Show(Browser* browser, gfx::NativeWindow parent_window); | 21 static void Show(Browser* browser, gfx::NativeWindow parent_window); |
22 | 22 |
23 private: | 23 private: |
24 explicit DownloadInProgressDialogView(Browser* browser); | 24 explicit DownloadInProgressDialogView(Browser* browser); |
25 virtual ~DownloadInProgressDialogView(); | 25 virtual ~DownloadInProgressDialogView(); |
26 | 26 |
27 // views::View: | 27 // views::DialogDelegate: |
28 virtual gfx::Size GetPreferredSize() OVERRIDE; | 28 virtual int GetDefaultDialogButton() const OVERRIDE; |
29 | |
30 // views::DialogDelegateView: | |
31 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | 29 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; |
32 virtual int GetDefaultDialogButton() const OVERRIDE; | |
33 virtual bool Cancel() OVERRIDE; | 30 virtual bool Cancel() OVERRIDE; |
34 virtual bool Accept() OVERRIDE; | 31 virtual bool Accept() OVERRIDE; |
| 32 |
| 33 // views::WidgetDelegate: |
35 virtual ui::ModalType GetModalType() const OVERRIDE; | 34 virtual ui::ModalType GetModalType() const OVERRIDE; |
36 virtual string16 GetWindowTitle() const OVERRIDE; | 35 virtual string16 GetWindowTitle() const OVERRIDE; |
| 36 virtual void DeleteDelegate() OVERRIDE; |
| 37 virtual views::Widget* GetWidget() OVERRIDE; |
| 38 virtual const views::Widget* GetWidget() const OVERRIDE; |
37 virtual views::View* GetContentsView() OVERRIDE; | 39 virtual views::View* GetContentsView() OVERRIDE; |
38 | 40 |
39 Browser* browser_; | 41 Browser* browser_; |
40 views::Label* warning_; | 42 views::MessageBoxView* message_box_view_; |
41 views::Label* explanation_; | |
42 | 43 |
| 44 string16 title_text_; |
43 string16 ok_button_text_; | 45 string16 ok_button_text_; |
44 string16 cancel_button_text_; | 46 string16 cancel_button_text_; |
45 | 47 |
46 gfx::Size dialog_dimensions_; | 48 gfx::Size dialog_dimensions_; |
47 | 49 |
48 DISALLOW_COPY_AND_ASSIGN(DownloadInProgressDialogView); | 50 DISALLOW_COPY_AND_ASSIGN(DownloadInProgressDialogView); |
49 }; | 51 }; |
50 | 52 |
51 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_ | 53 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_ |
OLD | NEW |