OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEBUI_ACTIVE_DOWNLOADS_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_ACTIVE_DOWNLOADS_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_ACTIVE_DOWNLOADS_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_ACTIVE_DOWNLOADS_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "chrome/browser/history/history.h" | 12 #include "chrome/browser/history/history.h" |
13 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 13 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
14 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 14 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
15 #include "net/base/directory_lister.h" | 15 #include "net/base/directory_lister.h" |
16 | 16 |
17 class ActiveDownloadsHandler; | 17 class ActiveDownloadsHandler; |
18 class Browser; | 18 class Browser; |
19 class DownloadItem; | 19 class DownloadItem; |
20 class Profile; | 20 class Profile; |
21 | 21 |
22 class ActiveDownloadsUI : public HtmlDialogUI { | 22 class ActiveDownloadsUI : public HtmlDialogUI { |
23 public: | 23 public: |
24 explicit ActiveDownloadsUI(TabContents* contents); | 24 explicit ActiveDownloadsUI(TabContents* contents); |
25 | 25 |
| 26 static bool ShouldShowPopup(Profile* profile, DownloadItem* download); |
26 static Browser* OpenPopup(Profile* profile); | 27 static Browser* OpenPopup(Profile* profile); |
27 static Browser* GetPopup(); | 28 static Browser* GetPopup(); |
28 | 29 |
29 // For testing. | 30 // For testing. |
30 typedef std::vector<DownloadItem*> DownloadList; | 31 typedef std::vector<DownloadItem*> DownloadList; |
31 const DownloadList& GetDownloads() const; | 32 const DownloadList& GetDownloads() const; |
32 | 33 |
33 private: | 34 private: |
34 ActiveDownloadsHandler* handler_; | 35 ActiveDownloadsHandler* handler_; |
35 | 36 |
36 DISALLOW_COPY_AND_ASSIGN(ActiveDownloadsUI); | 37 DISALLOW_COPY_AND_ASSIGN(ActiveDownloadsUI); |
37 }; | 38 }; |
38 | 39 |
39 #endif // CHROME_BROWSER_UI_WEBUI_ACTIVE_DOWNLOADS_UI_H_ | 40 #endif // CHROME_BROWSER_UI_WEBUI_ACTIVE_DOWNLOADS_UI_H_ |
OLD | NEW |