| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |