| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 int height; | 117 int height; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 // Constructor for use with the top level menu item. This menu is never | 120 // Constructor for use with the top level menu item. This menu is never |
| 121 // shown to the user, rather its use as the parent for all menu items. | 121 // shown to the user, rather its use as the parent for all menu items. |
| 122 explicit MenuItemView(MenuDelegate* delegate); | 122 explicit MenuItemView(MenuDelegate* delegate); |
| 123 | 123 |
| 124 // Overridden from View: | 124 // Overridden from View: |
| 125 bool GetTooltipText(const gfx::Point& p, | 125 bool GetTooltipText(const gfx::Point& p, |
| 126 base::string16* tooltip) const override; | 126 base::string16* tooltip) const override; |
| 127 void GetAccessibleState(ui::AXViewState* state) override; | 127 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 128 | 128 |
| 129 // Returns the preferred height of menu items. This is only valid when the | 129 // Returns the preferred height of menu items. This is only valid when the |
| 130 // menu is about to be shown. | 130 // menu is about to be shown. |
| 131 static int pref_menu_height() { return pref_menu_height_; } | 131 static int pref_menu_height() { return pref_menu_height_; } |
| 132 | 132 |
| 133 // X-coordinate of where the label starts. | 133 // X-coordinate of where the label starts. |
| 134 static int label_start() { return label_start_; } | 134 static int label_start() { return label_start_; } |
| 135 | 135 |
| 136 // Returns if a given |anchor| is a bubble or not. | 136 // Returns if a given |anchor| is a bubble or not. |
| 137 static bool IsBubble(MenuAnchorPosition anchor); | 137 static bool IsBubble(MenuAnchorPosition anchor); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 // If set to false, the right margin will be removed for menu lines | 519 // If set to false, the right margin will be removed for menu lines |
| 520 // containing other elements. | 520 // containing other elements. |
| 521 bool use_right_margin_; | 521 bool use_right_margin_; |
| 522 | 522 |
| 523 DISALLOW_COPY_AND_ASSIGN(MenuItemView); | 523 DISALLOW_COPY_AND_ASSIGN(MenuItemView); |
| 524 }; | 524 }; |
| 525 | 525 |
| 526 } // namespace views | 526 } // namespace views |
| 527 | 527 |
| 528 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 528 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
| OLD | NEW |