| 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 "ui/accessibility/ax_view_state.h" | 10 #include "ui/accessibility/ax_view_state.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 public: | 42 public: |
| 43 explicit EmptyMenuMenuItem(MenuItemView* parent) | 43 explicit EmptyMenuMenuItem(MenuItemView* parent) |
| 44 : MenuItemView(parent, 0, EMPTY) { | 44 : MenuItemView(parent, 0, EMPTY) { |
| 45 // Set this so that we're not identified as a normal menu item. | 45 // Set this so that we're not identified as a normal menu item. |
| 46 set_id(kEmptyMenuItemViewID); | 46 set_id(kEmptyMenuItemViewID); |
| 47 SetTitle(l10n_util::GetStringUTF16(IDS_APP_MENU_EMPTY_SUBMENU)); | 47 SetTitle(l10n_util::GetStringUTF16(IDS_APP_MENU_EMPTY_SUBMENU)); |
| 48 SetEnabled(false); | 48 SetEnabled(false); |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual bool GetTooltipText(const gfx::Point& p, | 51 virtual bool GetTooltipText(const gfx::Point& p, |
| 52 base::string16* tooltip) const OVERRIDE { | 52 base::string16* tooltip) const override { |
| 53 // Empty menu items shouldn't have a tooltip. | 53 // Empty menu items shouldn't have a tooltip. |
| 54 return false; | 54 return false; |
| 55 } | 55 } |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 DISALLOW_COPY_AND_ASSIGN(EmptyMenuMenuItem); | 58 DISALLOW_COPY_AND_ASSIGN(EmptyMenuMenuItem); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace | 61 } // namespace |
| 62 | 62 |
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 } else { | 1077 } else { |
| 1078 const Type& type = menu_item->GetType(); | 1078 const Type& type = menu_item->GetType(); |
| 1079 if (type == CHECKBOX || type == RADIO) | 1079 if (type == CHECKBOX || type == RADIO) |
| 1080 return true; | 1080 return true; |
| 1081 } | 1081 } |
| 1082 } | 1082 } |
| 1083 return false; | 1083 return false; |
| 1084 } | 1084 } |
| 1085 | 1085 |
| 1086 } // namespace views | 1086 } // namespace views |
| OLD | NEW |