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/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // static | 76 // static |
77 int MenuItemView::label_start_; | 77 int MenuItemView::label_start_; |
78 | 78 |
79 // static | 79 // static |
80 int MenuItemView::item_right_margin_; | 80 int MenuItemView::item_right_margin_; |
81 | 81 |
82 // static | 82 // static |
83 int MenuItemView::pref_menu_height_; | 83 int MenuItemView::pref_menu_height_; |
84 | 84 |
85 // static | 85 // static |
86 const char MenuItemView::kViewClassName[] = "views/MenuItemView"; | 86 const char MenuItemView::kViewClassName[] = "MenuItemView"; |
87 | 87 |
88 MenuItemView::MenuItemView(MenuDelegate* delegate) | 88 MenuItemView::MenuItemView(MenuDelegate* delegate) |
89 : delegate_(delegate), | 89 : delegate_(delegate), |
90 controller_(NULL), | 90 controller_(NULL), |
91 canceled_(false), | 91 canceled_(false), |
92 parent_menu_item_(NULL), | 92 parent_menu_item_(NULL), |
93 type_(SUBMENU), | 93 type_(SUBMENU), |
94 selected_(false), | 94 selected_(false), |
95 command_(0), | 95 command_(0), |
96 submenu_(NULL), | 96 submenu_(NULL), |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 } else { | 1064 } else { |
1065 const Type& type = menu_item->GetType(); | 1065 const Type& type = menu_item->GetType(); |
1066 if (type == CHECKBOX || type == RADIO) | 1066 if (type == CHECKBOX || type == RADIO) |
1067 return true; | 1067 return true; |
1068 } | 1068 } |
1069 } | 1069 } |
1070 return false; | 1070 return false; |
1071 } | 1071 } |
1072 | 1072 |
1073 } // namespace views | 1073 } // namespace views |
OLD | NEW |