| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/wrench_menu_model.h" | 5 #include "chrome/browser/wrench_menu_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS); | 140 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS); |
| 141 #endif | 141 #endif |
| 142 AddSeparator(); | 142 AddSeparator(); |
| 143 #endif | 143 #endif |
| 144 | 144 |
| 145 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS); | 145 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS); |
| 146 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 146 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
| 147 AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA); | 147 AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA); |
| 148 | 148 |
| 149 AddSeparator(); | 149 AddSeparator(); |
| 150 AddItemWithStringId(IDC_REPORT_BUG, IDS_REPORT_BUG); |
| 151 AddSeparator(); |
| 150 | 152 |
| 151 encoding_menu_model_.reset(new EncodingMenuModel(browser)); | 153 encoding_menu_model_.reset(new EncodingMenuModel(browser)); |
| 152 AddSubMenuWithStringId(IDC_ENCODING_MENU, IDS_ENCODING_MENU, | 154 AddSubMenuWithStringId(IDC_ENCODING_MENU, IDS_ENCODING_MENU, |
| 153 encoding_menu_model_.get()); | 155 encoding_menu_model_.get()); |
| 154 AddItemWithStringId(IDC_VIEW_SOURCE, IDS_VIEW_SOURCE); | 156 AddItemWithStringId(IDC_VIEW_SOURCE, IDS_VIEW_SOURCE); |
| 155 if (g_browser_process->have_inspector_files()) { | 157 if (g_browser_process->have_inspector_files()) { |
| 156 AddItemWithStringId(IDC_DEV_TOOLS, IDS_DEV_TOOLS); | 158 AddItemWithStringId(IDC_DEV_TOOLS, IDS_DEV_TOOLS); |
| 157 AddItemWithStringId(IDC_DEV_TOOLS_CONSOLE, IDS_DEV_TOOLS_CONSOLE); | 159 AddItemWithStringId(IDC_DEV_TOOLS_CONSOLE, IDS_DEV_TOOLS_CONSOLE); |
| 158 } | 160 } |
| 159 } | 161 } |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 int command_id = GetCommandIdAt(index); | 420 int command_id = GetCommandIdAt(index); |
| 419 return command_id == IDC_SYNC_BOOKMARKS || | 421 return command_id == IDC_SYNC_BOOKMARKS || |
| 420 command_id == IDC_ABOUT; | 422 command_id == IDC_ABOUT; |
| 421 } | 423 } |
| 422 | 424 |
| 423 bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const { | 425 bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const { |
| 424 if (delegate_) | 426 if (delegate_) |
| 425 return delegate_->IsCommandIdEnabled(command_id); | 427 return delegate_->IsCommandIdEnabled(command_id); |
| 426 return true; | 428 return true; |
| 427 } | 429 } |
| OLD | NEW |