| 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_delegate.h" |
| 6 |
| 7 #include "ui/events/event.h" |
| 5 #include "ui/views/controls/menu/menu_config.h" | 8 #include "ui/views/controls/menu/menu_config.h" |
| 6 #include "ui/views/controls/menu/menu_delegate.h" | |
| 7 | 9 |
| 8 namespace views { | 10 namespace views { |
| 9 | 11 |
| 10 MenuDelegate::~MenuDelegate() {} | 12 MenuDelegate::~MenuDelegate() {} |
| 11 | 13 |
| 12 bool MenuDelegate::IsItemChecked(int id) const { | 14 bool MenuDelegate::IsItemChecked(int id) const { |
| 13 return false; | 15 return false; |
| 14 } | 16 } |
| 15 | 17 |
| 16 base::string16 MenuDelegate::GetLabel(int id) const { | 18 base::string16 MenuDelegate::GetLabel(int id) const { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 NOTREACHED() << "If you override CanDrag, you must override this too."; | 126 NOTREACHED() << "If you override CanDrag, you must override this too."; |
| 125 } | 127 } |
| 126 | 128 |
| 127 int MenuDelegate::GetDragOperations(MenuItemView* sender) { | 129 int MenuDelegate::GetDragOperations(MenuItemView* sender) { |
| 128 NOTREACHED() << "If you override CanDrag, you must override this too."; | 130 NOTREACHED() << "If you override CanDrag, you must override this too."; |
| 129 return 0; | 131 return 0; |
| 130 } | 132 } |
| 131 | 133 |
| 132 MenuItemView* MenuDelegate::GetSiblingMenu(MenuItemView* menu, | 134 MenuItemView* MenuDelegate::GetSiblingMenu(MenuItemView* menu, |
| 133 const gfx::Point& screen_point, | 135 const gfx::Point& screen_point, |
| 134 MenuItemView::AnchorPosition* anchor, | 136 ui::MenuAnchorPosition* anchor, |
| 135 bool* has_mnemonics, | 137 bool* has_mnemonics, |
| 136 MenuButton** button) { | 138 MenuButton** button) { |
| 137 return NULL; | 139 return NULL; |
| 138 } | 140 } |
| 139 | 141 |
| 140 int MenuDelegate::GetMaxWidthForMenu(MenuItemView* menu) { | 142 int MenuDelegate::GetMaxWidthForMenu(MenuItemView* menu) { |
| 141 // NOTE: this needs to be large enough to accommodate the wrench menu with | 143 // NOTE: this needs to be large enough to accommodate the wrench menu with |
| 142 // big fonts. | 144 // big fonts. |
| 143 return 800; | 145 return 800; |
| 144 } | 146 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 155 int* right_margin) const { | 157 int* right_margin) const { |
| 156 *left_margin = 0; | 158 *left_margin = 0; |
| 157 *right_margin = 0; | 159 *right_margin = 0; |
| 158 } | 160 } |
| 159 | 161 |
| 160 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { | 162 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { |
| 161 return true; | 163 return true; |
| 162 } | 164 } |
| 163 | 165 |
| 164 } // namespace views | 166 } // namespace views |
| OLD | NEW |