Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: ui/views/controls/menu/submenu_view.h

Issue 1230163004: Selects last item in a menu when pressing 'up' initially (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Selects last item in a menu when pressing 'up' initially (nits) Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/controls/menu/menu_item_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_item_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698