Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: chrome/browser/download/download_shelf.h

Issue 246004: Remove the context menu item 'Remove from list' from download shelf (Closed)
Patch Set: rebased Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/download/download_shelf.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual DownloadItem* download() const { return download_; } 50 virtual DownloadItem* download() const { return download_; }
51 51
52 protected: 52 protected:
53 explicit DownloadShelfContextMenu(BaseDownloadItemModel* download_model); 53 explicit DownloadShelfContextMenu(BaseDownloadItemModel* download_model);
54 54
55 enum ContextMenuCommands { 55 enum ContextMenuCommands {
56 SHOW_IN_FOLDER = 1, // Open a file explorer window with the item selected. 56 SHOW_IN_FOLDER = 1, // Open a file explorer window with the item selected.
57 OPEN_WHEN_COMPLETE, // Open the download when it's finished. 57 OPEN_WHEN_COMPLETE, // Open the download when it's finished.
58 ALWAYS_OPEN_TYPE, // Default this file extension to always open. 58 ALWAYS_OPEN_TYPE, // Default this file extension to always open.
59 CANCEL, // Cancel the download. 59 CANCEL, // Cancel the download.
60 REMOVE_ITEM, // Removes the item from the download shelf.
61 TOGGLE_PAUSE, // Temporarily pause a download. 60 TOGGLE_PAUSE, // Temporarily pause a download.
62 MENU_LAST 61 MENU_LAST
63 }; 62 };
64 63
65 protected: 64 protected:
66 bool ItemIsChecked(int id) const; 65 bool ItemIsChecked(int id) const;
67 bool ItemIsDefault(int id) const; 66 bool ItemIsDefault(int id) const;
68 std::wstring GetItemLabel(int id) const; 67 std::wstring GetItemLabel(int id) const;
69 bool IsItemCommandEnabled(int id) const; 68 bool IsItemCommandEnabled(int id) const;
70 void ExecuteItemCommand(int id); 69 void ExecuteItemCommand(int id);
71 70
72 // Information source. 71 // Information source.
73 DownloadItem* download_; 72 DownloadItem* download_;
74 73
75 // A model to control the cancel behavior. 74 // A model to control the cancel behavior.
76 BaseDownloadItemModel* model_; 75 BaseDownloadItemModel* model_;
77 76
78 private: 77 private:
79 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); 78 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu);
80 }; 79 };
81 80
82 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ 81 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/download/download_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698