| 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 "ui/base/models/simple_menu_model.h" | 5 #include "ui/base/models/simple_menu_model.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 MenuSeparatorType separator_type; | 30 MenuSeparatorType separator_type; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 //////////////////////////////////////////////////////////////////////////////// | 33 //////////////////////////////////////////////////////////////////////////////// |
| 34 // SimpleMenuModel::Delegate, public: | 34 // SimpleMenuModel::Delegate, public: |
| 35 | 35 |
| 36 bool SimpleMenuModel::Delegate::IsCommandIdVisible(int command_id) const { | 36 bool SimpleMenuModel::Delegate::IsCommandIdVisible(int command_id) const { |
| 37 return true; | 37 return true; |
| 38 } | 38 } |
| 39 | 39 |
| 40 bool SimpleMenuModel::Delegate::GetAcceleratorForCommandId( |
| 41 int command_id, |
| 42 ui::Accelerator* accelerator) const { |
| 43 return false; |
| 44 } |
| 45 |
| 40 bool SimpleMenuModel::Delegate::IsItemForCommandIdDynamic( | 46 bool SimpleMenuModel::Delegate::IsItemForCommandIdDynamic( |
| 41 int command_id) const { | 47 int command_id) const { |
| 42 return false; | 48 return false; |
| 43 } | 49 } |
| 44 | 50 |
| 45 base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId( | 51 base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId( |
| 46 int command_id) const { | 52 int command_id) const { |
| 47 return base::string16(); | 53 return base::string16(); |
| 48 } | 54 } |
| 49 | 55 |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 #ifndef NDEBUG | 451 #ifndef NDEBUG |
| 446 if (item.type == TYPE_SEPARATOR) { | 452 if (item.type == TYPE_SEPARATOR) { |
| 447 DCHECK_EQ(item.command_id, kSeparatorId); | 453 DCHECK_EQ(item.command_id, kSeparatorId); |
| 448 } else { | 454 } else { |
| 449 DCHECK_GE(item.command_id, 0); | 455 DCHECK_GE(item.command_id, 0); |
| 450 } | 456 } |
| 451 #endif // NDEBUG | 457 #endif // NDEBUG |
| 452 } | 458 } |
| 453 | 459 |
| 454 } // namespace ui | 460 } // namespace ui |
| OLD | NEW |