| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 389 } |
| 390 return l10n_util::GetStringFUTF16( | 390 return l10n_util::GetStringFUTF16( |
| 391 IDS_ABOUT, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 391 IDS_ABOUT, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 392 } | 392 } |
| 393 | 393 |
| 394 bool WrenchMenuModel::IsDynamicItem(int index) const { | 394 bool WrenchMenuModel::IsDynamicItem(int index) const { |
| 395 int command_id = GetCommandIdAt(index); | 395 int command_id = GetCommandIdAt(index); |
| 396 return command_id == IDC_SYNC_BOOKMARKS || | 396 return command_id == IDC_SYNC_BOOKMARKS || |
| 397 command_id == IDC_ABOUT; | 397 command_id == IDC_ABOUT; |
| 398 } | 398 } |
| 399 |
| 400 bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const { |
| 401 if (delegate_) |
| 402 return delegate_->IsCommandIdEnabled(command_id); |
| 403 return true; |
| 404 } |
| OLD | NEW |