OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_context_menu.h" | 5 #include "chrome/browser/download/download_shelf_context_menu.h" |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/download/download_crx_util.h" | 8 #include "chrome/browser/download/download_crx_util.h" |
9 #include "chrome/browser/download/download_item_model.h" | 9 #include "chrome/browser/download/download_item_model.h" |
10 #include "chrome/browser/download/download_prefs.h" | 10 #include "chrome/browser/download/download_prefs.h" |
11 #include "chrome/browser/safe_browsing/download_protection_service.h" | 11 #include "chrome/browser/safe_browsing/download_protection_service.h" |
12 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 12 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
13 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
14 #include "chrome/common/extensions/extension_switch_utils.h" | 14 #include "chrome/common/extensions/extension_switch_utils.h" |
15 #include "content/public/browser/download_item.h" | 15 #include "content/public/browser/download_item.h" |
16 #include "content/public/browser/download_manager.h" | 16 #include "content/public/browser/download_manager.h" |
17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 | 19 |
20 using content::DownloadItem; | 20 using content::DownloadItem; |
| 21 using extensions::Extension; |
21 | 22 |
22 DownloadShelfContextMenu::~DownloadShelfContextMenu() {} | 23 DownloadShelfContextMenu::~DownloadShelfContextMenu() {} |
23 | 24 |
24 DownloadShelfContextMenu::DownloadShelfContextMenu( | 25 DownloadShelfContextMenu::DownloadShelfContextMenu( |
25 BaseDownloadItemModel* download_model) | 26 BaseDownloadItemModel* download_model) |
26 : download_model_(download_model), | 27 : download_model_(download_model), |
27 download_item_(download_model->download()) { | 28 download_item_(download_model->download()) { |
28 } | 29 } |
29 | 30 |
30 ui::SimpleMenuModel* DownloadShelfContextMenu::GetMenuModel() { | 31 ui::SimpleMenuModel* DownloadShelfContextMenu::GetMenuModel() { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 malicious_download_menu_model_->AddItemWithStringId( | 228 malicious_download_menu_model_->AddItemWithStringId( |
228 DISCARD, IDS_DOWNLOAD_MENU_DISCARD); | 229 DISCARD, IDS_DOWNLOAD_MENU_DISCARD); |
229 malicious_download_menu_model_->AddItemWithStringId( | 230 malicious_download_menu_model_->AddItemWithStringId( |
230 KEEP, IDS_DOWNLOAD_MENU_KEEP); | 231 KEEP, IDS_DOWNLOAD_MENU_KEEP); |
231 malicious_download_menu_model_->AddSeparator(); | 232 malicious_download_menu_model_->AddSeparator(); |
232 malicious_download_menu_model_->AddItemWithStringId( | 233 malicious_download_menu_model_->AddItemWithStringId( |
233 LEARN_MORE, IDS_DOWNLOAD_MENU_LEARN_MORE); | 234 LEARN_MORE, IDS_DOWNLOAD_MENU_LEARN_MORE); |
234 | 235 |
235 return malicious_download_menu_model_.get(); | 236 return malicious_download_menu_model_.get(); |
236 } | 237 } |
OLD | NEW |