| 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/views/controls/menu/menu_config.h" | 5 #include "ui/views/controls/menu/menu_config.h" |
| 6 #include "ui/views/controls/menu/menu_delegate.h" | 6 #include "ui/views/controls/menu/menu_delegate.h" |
| 7 | 7 |
| 8 namespace views { | 8 namespace views { |
| 9 | 9 |
| 10 MenuDelegate::~MenuDelegate() {} | 10 MenuDelegate::~MenuDelegate() {} |
| 11 | 11 |
| 12 bool MenuDelegate::IsItemChecked(int id) const { | 12 bool MenuDelegate::IsItemChecked(int id) const { |
| 13 return false; | 13 return false; |
| 14 } | 14 } |
| 15 | 15 |
| 16 string16 MenuDelegate::GetLabel(int id) const { | 16 base::string16 MenuDelegate::GetLabel(int id) const { |
| 17 return string16(); | 17 return base::string16(); |
| 18 } | 18 } |
| 19 | 19 |
| 20 const gfx::Font* MenuDelegate::GetLabelFont(int id) const { | 20 const gfx::Font* MenuDelegate::GetLabelFont(int id) const { |
| 21 return NULL; | 21 return NULL; |
| 22 } | 22 } |
| 23 | 23 |
| 24 bool MenuDelegate::GetBackgroundColor(int command_id, | 24 bool MenuDelegate::GetBackgroundColor(int command_id, |
| 25 bool is_hovered, | 25 bool is_hovered, |
| 26 SkColor* override_color) const { | 26 SkColor* override_color) const { |
| 27 return false; | 27 return false; |
| 28 } | 28 } |
| 29 | 29 |
| 30 bool MenuDelegate::GetForegroundColor(int command_id, | 30 bool MenuDelegate::GetForegroundColor(int command_id, |
| 31 bool is_hovered, | 31 bool is_hovered, |
| 32 SkColor* override_color) const { | 32 SkColor* override_color) const { |
| 33 return false; | 33 return false; |
| 34 } | 34 } |
| 35 | 35 |
| 36 string16 MenuDelegate::GetTooltipText(int id, | 36 base::string16 MenuDelegate::GetTooltipText(int id, |
| 37 const gfx::Point& screen_loc) const { | 37 const gfx::Point& screen_loc) const { |
| 38 return string16(); | 38 return base::string16(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool MenuDelegate::GetAccelerator(int id, ui::Accelerator* accelerator) { | 41 bool MenuDelegate::GetAccelerator(int id, ui::Accelerator* accelerator) { |
| 42 return false; | 42 return false; |
| 43 } | 43 } |
| 44 | 44 |
| 45 bool MenuDelegate::ShowContextMenu(MenuItemView* source, | 45 bool MenuDelegate::ShowContextMenu(MenuItemView* source, |
| 46 int id, | 46 int id, |
| 47 const gfx::Point& p, | 47 const gfx::Point& p, |
| 48 ui::MenuSourceType source_type) { | 48 ui::MenuSourceType source_type) { |
| 49 return false; | 49 return false; |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool MenuDelegate::SupportsCommand(int id) const { | 52 bool MenuDelegate::SupportsCommand(int id) const { |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool MenuDelegate::IsCommandEnabled(int id) const { | 56 bool MenuDelegate::IsCommandEnabled(int id) const { |
| 57 return true; | 57 return true; |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool MenuDelegate::GetContextualLabel(int id, string16* out) const { | 60 bool MenuDelegate::GetContextualLabel(int id, base::string16* out) const { |
| 61 return false; | 61 return false; |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool MenuDelegate::ShouldCloseAllMenusOnExecute(int id) { | 64 bool MenuDelegate::ShouldCloseAllMenusOnExecute(int id) { |
| 65 return true; | 65 return true; |
| 66 } | 66 } |
| 67 | 67 |
| 68 void MenuDelegate::ExecuteCommand(int id, int mouse_event_flags) { | 68 void MenuDelegate::ExecuteCommand(int id, int mouse_event_flags) { |
| 69 ExecuteCommand(id); | 69 ExecuteCommand(id); |
| 70 } | 70 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 int* right_margin) const { | 150 int* right_margin) const { |
| 151 *left_margin = 0; | 151 *left_margin = 0; |
| 152 *right_margin = 0; | 152 *right_margin = 0; |
| 153 } | 153 } |
| 154 | 154 |
| 155 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { | 155 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { |
| 156 return true; | 156 return true; |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace views | 159 } // namespace views |
| OLD | NEW |