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_item_view.h" | 5 #include "ui/views/controls/menu/menu_item_view.h" |
6 | 6 |
7 #include "base/i18n/case_conversion.h" | 7 #include "base/i18n/case_conversion.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 break; | 177 break; |
178 case NORMAL: | 178 case NORMAL: |
179 case SEPARATOR: | 179 case SEPARATOR: |
180 case EMPTY: | 180 case EMPTY: |
181 // No additional accessibility states currently for these menu states. | 181 // No additional accessibility states currently for these menu states. |
182 break; | 182 break; |
183 } | 183 } |
184 } | 184 } |
185 | 185 |
186 // static | 186 // static |
187 bool MenuItemView::IsBubble(MenuItemView::AnchorPosition anchor) { | 187 bool MenuItemView::IsBubble(MenuAnchorPosition anchor) { |
188 return anchor == MenuItemView::BUBBLE_LEFT || | 188 return anchor == MENU_ANCHOR_BUBBLE_LEFT || |
189 anchor == MenuItemView::BUBBLE_RIGHT || | 189 anchor == MENU_ANCHOR_BUBBLE_RIGHT || |
190 anchor == MenuItemView::BUBBLE_ABOVE || | 190 anchor == MENU_ANCHOR_BUBBLE_ABOVE || |
191 anchor == MenuItemView::BUBBLE_BELOW; | 191 anchor == MENU_ANCHOR_BUBBLE_BELOW; |
192 } | 192 } |
193 | 193 |
194 // static | 194 // static |
195 base::string16 MenuItemView::GetAccessibleNameForMenuItem( | 195 base::string16 MenuItemView::GetAccessibleNameForMenuItem( |
196 const base::string16& item_text, const base::string16& minor_text) { | 196 const base::string16& item_text, const base::string16& minor_text) { |
197 base::string16 accessible_name = item_text; | 197 base::string16 accessible_name = item_text; |
198 | 198 |
199 // Filter out the "&" for accessibility clients. | 199 // Filter out the "&" for accessibility clients. |
200 size_t index = 0; | 200 size_t index = 0; |
201 const base::char16 amp = '&'; | 201 const base::char16 amp = '&'; |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 } else { | 1065 } else { |
1066 const Type& type = menu_item->GetType(); | 1066 const Type& type = menu_item->GetType(); |
1067 if (type == CHECKBOX || type == RADIO) | 1067 if (type == CHECKBOX || type == RADIO) |
1068 return true; | 1068 return true; |
1069 } | 1069 } |
1070 } | 1070 } |
1071 return false; | 1071 return false; |
1072 } | 1072 } |
1073 | 1073 |
1074 } // namespace views | 1074 } // namespace views |
OLD | NEW |