| 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 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 // All the AppendXXX methods funnel into this. | 199 // All the AppendXXX methods funnel into this. |
| 200 MenuItemView* AppendMenuItemImpl(int item_id, | 200 MenuItemView* AppendMenuItemImpl(int item_id, |
| 201 const base::string16& label, | 201 const base::string16& label, |
| 202 const base::string16& sublabel, | 202 const base::string16& sublabel, |
| 203 const base::string16& minor_text, | 203 const base::string16& minor_text, |
| 204 const gfx::ImageSkia& icon, | 204 const gfx::ImageSkia& icon, |
| 205 Type type, | 205 Type type, |
| 206 ui::MenuSeparatorType separator_style); | 206 ui::MenuSeparatorType separator_style); |
| 207 | 207 |
| 208 // Returns the view that contains child menu items. If the submenu has | 208 // Creates and returns the view that contains child menu items. |
| 209 // not been creates, this creates it. | |
| 210 virtual SubmenuView* CreateSubmenu(); | 209 virtual SubmenuView* CreateSubmenu(); |
| 211 | 210 |
| 212 // Returns true if this menu item has a submenu. | 211 // Returns true if this menu item has a submenu. |
| 213 virtual bool HasSubmenu() const; | 212 virtual bool HasSubmenu() const; |
| 214 | 213 |
| 215 // Returns the view containing child menu items. | 214 // Returns the view containing child menu items. |
| 216 virtual SubmenuView* GetSubmenu() const; | 215 virtual SubmenuView* GetSubmenu() const; |
| 217 | 216 |
| 218 // Returns the parent menu item. | 217 // Returns the parent menu item. |
| 219 MenuItemView* GetParentMenuItem() { return parent_menu_item_; } | 218 MenuItemView* GetParentMenuItem() { return parent_menu_item_; } |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 // If set to false, the right margin will be removed for menu lines | 515 // If set to false, the right margin will be removed for menu lines |
| 517 // containing other elements. | 516 // containing other elements. |
| 518 bool use_right_margin_; | 517 bool use_right_margin_; |
| 519 | 518 |
| 520 DISALLOW_COPY_AND_ASSIGN(MenuItemView); | 519 DISALLOW_COPY_AND_ASSIGN(MenuItemView); |
| 521 }; | 520 }; |
| 522 | 521 |
| 523 } // namespace views | 522 } // namespace views |
| 524 | 523 |
| 525 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 524 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
| OLD | NEW |