OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DOWNLOAD_DOWNLOAD_SHELF_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "app/menus/simple_menu_model.h" | 9 #include "app/menus/simple_menu_model.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 virtual Browser* browser() const = 0; | 42 virtual Browser* browser() const = 0; |
43 }; | 43 }; |
44 | 44 |
45 // Logic for the download shelf context menu. Platform specific subclasses are | 45 // Logic for the download shelf context menu. Platform specific subclasses are |
46 // responsible for creating and running the menu. | 46 // responsible for creating and running the menu. |
47 class DownloadShelfContextMenu : public menus::SimpleMenuModel::Delegate { | 47 class DownloadShelfContextMenu : public menus::SimpleMenuModel::Delegate { |
48 public: | 48 public: |
49 virtual ~DownloadShelfContextMenu(); | 49 virtual ~DownloadShelfContextMenu(); |
50 | 50 |
51 virtual DownloadItem* download() const { return download_; } | 51 virtual DownloadItem* download() const; |
52 | 52 |
53 enum ContextMenuCommands { | 53 enum ContextMenuCommands { |
54 SHOW_IN_FOLDER = 1, // Open a file explorer window with the item selected. | 54 SHOW_IN_FOLDER = 1, // Open a file explorer window with the item selected. |
55 OPEN_WHEN_COMPLETE, // Open the download when it's finished. | 55 OPEN_WHEN_COMPLETE, // Open the download when it's finished. |
56 ALWAYS_OPEN_TYPE, // Default this file extension to always open. | 56 ALWAYS_OPEN_TYPE, // Default this file extension to always open. |
57 CANCEL, // Cancel the download. | 57 CANCEL, // Cancel the download. |
58 TOGGLE_PAUSE, // Temporarily pause a download. | 58 TOGGLE_PAUSE, // Temporarily pause a download. |
59 MENU_LAST | 59 MENU_LAST |
60 }; | 60 }; |
61 | 61 |
(...skipping 20 matching lines...) Expand all Loading... |
82 private: | 82 private: |
83 // We show slightly different menus if the download is in progress vs. if the | 83 // We show slightly different menus if the download is in progress vs. if the |
84 // download has finished. | 84 // download has finished. |
85 scoped_ptr<menus::SimpleMenuModel> in_progress_download_menu_model_; | 85 scoped_ptr<menus::SimpleMenuModel> in_progress_download_menu_model_; |
86 scoped_ptr<menus::SimpleMenuModel> finished_download_menu_model_; | 86 scoped_ptr<menus::SimpleMenuModel> finished_download_menu_model_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); | 88 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); |
89 }; | 89 }; |
90 | 90 |
91 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ | 91 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
OLD | NEW |