Index: chrome/browser/download/download_shelf_context_menu.h |
diff --git a/chrome/browser/download/download_shelf_context_menu.h b/chrome/browser/download/download_shelf_context_menu.h |
index ecf9d99f38d54e22f46cb478a813b5137e2aac3a..61f5d2916d1471a77fc3fd7831d8c53ebfd0ebce 100644 |
--- a/chrome/browser/download/download_shelf_context_menu.h |
+++ b/chrome/browser/download/download_shelf_context_menu.h |
@@ -9,6 +9,7 @@ |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/strings/string16.h" |
+#include "chrome/browser/download/download_commands.h" |
#include "content/public/browser/download_item.h" |
#include "ui/base/models/simple_menu_model.h" |
@@ -24,19 +25,6 @@ class PageNavigator; |
class DownloadShelfContextMenu : public ui::SimpleMenuModel::Delegate, |
public content::DownloadItem::Observer { |
public: |
- enum ContextMenuCommands { |
- SHOW_IN_FOLDER = 1, // Open a folder view window with the item selected. |
- OPEN_WHEN_COMPLETE, // Open the download when it's finished. |
- ALWAYS_OPEN_TYPE, // Default this file extension to always open. |
- PLATFORM_OPEN, // Open using platform handler. |
- CANCEL, // Cancel the download. |
- TOGGLE_PAUSE, // Pause or resume a download. |
- DISCARD, // Discard the malicious download. |
- KEEP, // Keep the malicious download. |
- LEARN_MORE_SCANNING, // Show information about download scanning. |
- LEARN_MORE_INTERRUPTED,// Show information about interrupted downloads. |
- }; |
- |
~DownloadShelfContextMenu() override; |
content::DownloadItem* download_item() const { return download_item_; } |
@@ -68,22 +56,16 @@ class DownloadShelfContextMenu : public ui::SimpleMenuModel::Delegate, |
void OnDownloadDestroyed(content::DownloadItem* download) override; |
ui::SimpleMenuModel* GetInProgressMenuModel(); |
+ ui::SimpleMenuModel* GetInProgressPausedMenuModel(); |
ui::SimpleMenuModel* GetFinishedMenuModel(); |
ui::SimpleMenuModel* GetInterruptedMenuModel(); |
ui::SimpleMenuModel* GetMaybeMaliciousMenuModel(); |
ui::SimpleMenuModel* GetMaliciousMenuModel(); |
- int GetAlwaysOpenStringId() const; |
- |
-#if defined(OS_WIN) || defined(OS_LINUX) || \ |
- (defined(OS_MACOSX) && !defined(OS_IOS)) |
- bool IsDownloadPdf() const; |
- bool CanOpenPdfInSystemViewer() const; |
-#endif |
- |
// We show slightly different menus if the download is in progress vs. if the |
// download has finished. |
scoped_ptr<ui::SimpleMenuModel> in_progress_download_menu_model_; |
+ scoped_ptr<ui::SimpleMenuModel> in_progress_download_paused_menu_model_; |
scoped_ptr<ui::SimpleMenuModel> finished_download_menu_model_; |
scoped_ptr<ui::SimpleMenuModel> interrupted_download_menu_model_; |
scoped_ptr<ui::SimpleMenuModel> maybe_malicious_download_menu_model_; |
@@ -91,6 +73,7 @@ class DownloadShelfContextMenu : public ui::SimpleMenuModel::Delegate, |
// Information source. |
content::DownloadItem* download_item_; |
+ DownloadCommands download_commands_; |
// Used to open tabs. |
content::PageNavigator* navigator_; |