| 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_SUBMENU_VIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // Scrolls on menu item boundaries. | 83 // Scrolls on menu item boundaries. |
| 84 void OnGestureEvent(ui::GestureEvent* event) override; | 84 void OnGestureEvent(ui::GestureEvent* event) override; |
| 85 | 85 |
| 86 // Overridden from PrefixDelegate. | 86 // Overridden from PrefixDelegate. |
| 87 int GetRowCount() override; | 87 int GetRowCount() override; |
| 88 int GetSelectedRow() override; | 88 int GetSelectedRow() override; |
| 89 void SetSelectedRow(int row) override; | 89 void SetSelectedRow(int row) override; |
| 90 base::string16 GetTextForRow(int row) override; | 90 base::string16 GetTextForRow(int row) override; |
| 91 | 91 |
| 92 // Returns true if the menu is showing. | 92 // Returns true if the menu is showing. |
| 93 bool IsShowing(); | 93 virtual bool IsShowing(); |
| 94 | 94 |
| 95 // Shows the menu at the specified location. Coordinates are in screen | 95 // Shows the menu at the specified location. Coordinates are in screen |
| 96 // coordinates. max_width gives the max width the view should be. | 96 // coordinates. max_width gives the max width the view should be. |
| 97 void ShowAt(Widget* parent, const gfx::Rect& bounds, bool do_capture); | 97 void ShowAt(Widget* parent, const gfx::Rect& bounds, bool do_capture); |
| 98 | 98 |
| 99 // Resets the bounds of the submenu to |bounds|. | 99 // Resets the bounds of the submenu to |bounds|. |
| 100 void Reposition(const gfx::Rect& bounds); | 100 void Reposition(const gfx::Rect& bounds); |
| 101 | 101 |
| 102 // Closes the menu, destroying the host. | 102 // Closes the menu, destroying the host. |
| 103 void Close(); | 103 void Close(); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 float roundoff_error_; | 213 float roundoff_error_; |
| 214 | 214 |
| 215 PrefixSelector prefix_selector_; | 215 PrefixSelector prefix_selector_; |
| 216 | 216 |
| 217 DISALLOW_COPY_AND_ASSIGN(SubmenuView); | 217 DISALLOW_COPY_AND_ASSIGN(SubmenuView); |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 } // namespace views | 220 } // namespace views |
| 221 | 221 |
| 222 #endif // UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 222 #endif // UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
| OLD | NEW |