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" | 5 #include "ui/views/controls/menu/menu_delegate.h" |
6 | 6 |
7 #include "ui/events/event.h" | 7 #include "ui/events/event.h" |
8 #include "ui/views/controls/menu/menu_config.h" | 8 #include "ui/views/controls/menu/menu_config.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 int MenuDelegate::GetDragOperations(MenuItemView* sender) { | 129 int MenuDelegate::GetDragOperations(MenuItemView* sender) { |
130 NOTREACHED() << "If you override CanDrag, you must override this too."; | 130 NOTREACHED() << "If you override CanDrag, you must override this too."; |
131 return 0; | 131 return 0; |
132 } | 132 } |
133 | 133 |
134 bool MenuDelegate::ShouldCloseOnDragComplete() { | 134 bool MenuDelegate::ShouldCloseOnDragComplete() { |
135 return true; | 135 return true; |
136 } | 136 } |
137 | 137 |
| 138 bool MenuDelegate::InNestedDrag() { |
| 139 return false; |
| 140 } |
| 141 |
138 MenuItemView* MenuDelegate::GetSiblingMenu(MenuItemView* menu, | 142 MenuItemView* MenuDelegate::GetSiblingMenu(MenuItemView* menu, |
139 const gfx::Point& screen_point, | 143 const gfx::Point& screen_point, |
140 MenuAnchorPosition* anchor, | 144 MenuAnchorPosition* anchor, |
141 bool* has_mnemonics, | 145 bool* has_mnemonics, |
142 MenuButton** button) { | 146 MenuButton** button) { |
143 return NULL; | 147 return NULL; |
144 } | 148 } |
145 | 149 |
146 int MenuDelegate::GetMaxWidthForMenu(MenuItemView* menu) { | 150 int MenuDelegate::GetMaxWidthForMenu(MenuItemView* menu) { |
147 // NOTE: this needs to be large enough to accommodate the wrench menu with | 151 // NOTE: this needs to be large enough to accommodate the wrench menu with |
(...skipping 13 matching lines...) Expand all Loading... |
161 int* right_margin) const { | 165 int* right_margin) const { |
162 *left_margin = 0; | 166 *left_margin = 0; |
163 *right_margin = 0; | 167 *right_margin = 0; |
164 } | 168 } |
165 | 169 |
166 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { | 170 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { |
167 return true; | 171 return true; |
168 } | 172 } |
169 | 173 |
170 } // namespace views | 174 } // namespace views |
OLD | NEW |