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

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

Issue 5697005: Change SimpleMenuModel on OSX to support dynamic icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update after merge Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/download/download_shelf.h ('k') | chrome/browser/gtk/menu_gtk.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 #include "chrome/browser/download/download_shelf.h" 5 #include "chrome/browser/download/download_shelf.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "chrome/browser/dom_ui/downloads_ui.h" 9 #include "chrome/browser/dom_ui/downloads_ui.h"
10 #include "chrome/browser/download/download_item.h" 10 #include "chrome/browser/download/download_item.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 default: 107 default:
108 NOTREACHED(); 108 NOTREACHED();
109 } 109 }
110 } 110 }
111 111
112 bool DownloadShelfContextMenu::GetAcceleratorForCommandId( 112 bool DownloadShelfContextMenu::GetAcceleratorForCommandId(
113 int command_id, menus::Accelerator* accelerator) { 113 int command_id, menus::Accelerator* accelerator) {
114 return false; 114 return false;
115 } 115 }
116 116
117 bool DownloadShelfContextMenu::IsLabelForCommandIdDynamic( 117 bool DownloadShelfContextMenu::IsItemForCommandIdDynamic(
118 int command_id) const { 118 int command_id) const {
119 return command_id == TOGGLE_PAUSE; 119 return command_id == TOGGLE_PAUSE;
120 } 120 }
121 121
122 menus::SimpleMenuModel* DownloadShelfContextMenu::GetInProgressMenuModel() { 122 menus::SimpleMenuModel* DownloadShelfContextMenu::GetInProgressMenuModel() {
123 if (in_progress_download_menu_model_.get()) 123 if (in_progress_download_menu_model_.get())
124 return in_progress_download_menu_model_.get(); 124 return in_progress_download_menu_model_.get();
125 125
126 in_progress_download_menu_model_.reset(new menus::SimpleMenuModel(this)); 126 in_progress_download_menu_model_.reset(new menus::SimpleMenuModel(this));
127 127
(...skipping 25 matching lines...) Expand all
153 ALWAYS_OPEN_TYPE, IDS_DOWNLOAD_MENU_ALWAYS_OPEN_TYPE); 153 ALWAYS_OPEN_TYPE, IDS_DOWNLOAD_MENU_ALWAYS_OPEN_TYPE);
154 finished_download_menu_model_->AddSeparator(); 154 finished_download_menu_model_->AddSeparator();
155 finished_download_menu_model_->AddItemWithStringId( 155 finished_download_menu_model_->AddItemWithStringId(
156 SHOW_IN_FOLDER, IDS_DOWNLOAD_MENU_SHOW); 156 SHOW_IN_FOLDER, IDS_DOWNLOAD_MENU_SHOW);
157 finished_download_menu_model_->AddSeparator(); 157 finished_download_menu_model_->AddSeparator();
158 finished_download_menu_model_->AddItemWithStringId( 158 finished_download_menu_model_->AddItemWithStringId(
159 CANCEL, IDS_DOWNLOAD_MENU_CANCEL); 159 CANCEL, IDS_DOWNLOAD_MENU_CANCEL);
160 160
161 return finished_download_menu_model_.get(); 161 return finished_download_menu_model_.get();
162 } 162 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_shelf.h ('k') | chrome/browser/gtk/menu_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698