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

Unified Diff: chrome/browser/download/download_shelf_context_menu.h

Issue 6974005: download: Add a GetMenuModel() that grabs the correct model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/download/download_shelf_context_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8f9b4c78d46afb340cfd04f25b956f75cf3a33d4..3e7c47dc273c012dad616cee5519cf7c847f567f 100644
--- a/chrome/browser/download/download_shelf_context_menu.h
+++ b/chrome/browser/download/download_shelf_context_menu.h
@@ -36,8 +36,9 @@ class DownloadShelfContextMenu : public ui::SimpleMenuModel::Delegate {
protected:
explicit DownloadShelfContextMenu(BaseDownloadItemModel* download_model);
- ui::SimpleMenuModel* GetInProgressMenuModel();
- ui::SimpleMenuModel* GetFinishedMenuModel();
+ // Returns the correct menu model depending whether the download item is
+ // completed or not.
+ ui::SimpleMenuModel* GetMenuModel();
// ui::SimpleMenuModel::Delegate:
virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
@@ -50,6 +51,9 @@ class DownloadShelfContextMenu : public ui::SimpleMenuModel::Delegate {
virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE;
private:
+ ui::SimpleMenuModel* GetInProgressMenuModel();
+ ui::SimpleMenuModel* GetFinishedMenuModel();
+
// 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_;
« no previous file with comments | « no previous file | chrome/browser/download/download_shelf_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698