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

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: Moved background page badge fix to another CL. 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 default: 103 default:
104 NOTREACHED(); 104 NOTREACHED();
105 } 105 }
106 } 106 }
107 107
108 bool DownloadShelfContextMenu::GetAcceleratorForCommandId( 108 bool DownloadShelfContextMenu::GetAcceleratorForCommandId(
109 int command_id, menus::Accelerator* accelerator) { 109 int command_id, menus::Accelerator* accelerator) {
110 return false; 110 return false;
111 } 111 }
112 112
113 bool DownloadShelfContextMenu::IsLabelForCommandIdDynamic( 113 bool DownloadShelfContextMenu::IsItemForCommandIdDynamic(
114 int command_id) const { 114 int command_id) const {
115 return command_id == TOGGLE_PAUSE; 115 return command_id == TOGGLE_PAUSE;
116 } 116 }
117 117
118 menus::SimpleMenuModel* DownloadShelfContextMenu::GetInProgressMenuModel() { 118 menus::SimpleMenuModel* DownloadShelfContextMenu::GetInProgressMenuModel() {
119 if (in_progress_download_menu_model_.get()) 119 if (in_progress_download_menu_model_.get())
120 return in_progress_download_menu_model_.get(); 120 return in_progress_download_menu_model_.get();
121 121
122 in_progress_download_menu_model_.reset(new menus::SimpleMenuModel(this)); 122 in_progress_download_menu_model_.reset(new menus::SimpleMenuModel(this));
123 123
(...skipping 25 matching lines...) Expand all
149 ALWAYS_OPEN_TYPE, IDS_DOWNLOAD_MENU_ALWAYS_OPEN_TYPE); 149 ALWAYS_OPEN_TYPE, IDS_DOWNLOAD_MENU_ALWAYS_OPEN_TYPE);
150 finished_download_menu_model_->AddSeparator(); 150 finished_download_menu_model_->AddSeparator();
151 finished_download_menu_model_->AddItemWithStringId( 151 finished_download_menu_model_->AddItemWithStringId(
152 SHOW_IN_FOLDER, IDS_DOWNLOAD_MENU_SHOW); 152 SHOW_IN_FOLDER, IDS_DOWNLOAD_MENU_SHOW);
153 finished_download_menu_model_->AddSeparator(); 153 finished_download_menu_model_->AddSeparator();
154 finished_download_menu_model_->AddItemWithStringId( 154 finished_download_menu_model_->AddItemWithStringId(
155 CANCEL, IDS_DOWNLOAD_MENU_CANCEL); 155 CANCEL, IDS_DOWNLOAD_MENU_CANCEL);
156 156
157 return finished_download_menu_model_.get(); 157 return finished_download_menu_model_.get();
158 } 158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698