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

Issue 7044016: Replace ButtonDropDown menu implementation (Menu2) with MenuItemView. (Closed)

Created:
9 years, 7 months ago by rhashimoto
Modified:
9 years, 6 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Replace ButtonDropDown menu implementation (Menu2) with MenuItemView. - Added views::MenuDelegate::WillHideMenu() - Added EMPTY to views::MenuItemView::Type to suppress delegate call. - Minor fixes for views::MenuModelAdapter There was a Windows-only views unit test that a click-drag would post the ButtonDropDown menu. This test relied on TrackPopupMenu not blocking for input if the menu was empty. Because MenuItemView does block, this test could not work as a unit test. I removed this test and added an interactive ui test to do the same thing. BUG=chromium-os:13887 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=87490

Patch Set 1 #

Patch Set 2 : Minor cleanup. #

Patch Set 3 : Remove menu member variable. #

Patch Set 4 : Fix Windows build. #

Patch Set 5 : Fix override of MenuDelegate method. #

Patch Set 6 : Replace local MenuModel adapter with new views::MenuModelAdapter. #

Patch Set 7 : Remove unused headers. #

Patch Set 8 : Fix empty menus. #

Patch Set 9 : Fix views DefaultButtonTest. #

Patch Set 10 : Add MenuDelegate::WillHideMenu(). #

Patch Set 11 : Add MenuDelegate::WillHideMenu(). Move ButtonDropDown drag test. #

Patch Set 12 : Minor cleanup. #

Total comments: 2

Patch Set 13 : Implemented reviewer recommendations. #

Patch Set 14 : One last little style fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -54 lines) Patch
A chrome/browser/ui/views/button_dropdown_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +130 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -0 lines 0 comments Download
M views/controls/button/button_dropdown.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -2 lines 0 comments Download
M views/controls/button/button_dropdown.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +47 lines, -29 lines 0 comments Download
M views/controls/menu/menu_controller.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -1 line 0 comments Download
M views/controls/menu/menu_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M views/controls/menu/menu_delegate.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M views/controls/menu/menu_item_view.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M views/controls/menu/menu_item_view.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -3 lines 0 comments Download
M views/controls/menu/menu_model_adapter.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M views/controls/menu/menu_model_adapter.cc View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -1 line 0 comments Download
M views/controls/menu/menu_model_adapter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M views/view_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -16 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
rhashimoto
Hi Scott - This is another Menu2 replacement. This one has an issue so it ...
9 years, 7 months ago (2011-05-19 19:04:43 UTC) #1
rhashimoto
Sorry, there was one other issue. MenuModel::GetFirstItemIndex() takes a NativeMenu argument, which I don't have. ...
9 years, 7 months ago (2011-05-19 19:08:57 UTC) #2
sky
On 2011/05/19 19:04:43, rhashimoto wrote: > Hi Scott - > > This is another Menu2 ...
9 years, 7 months ago (2011-05-19 20:42:26 UTC) #3
sky
On 2011/05/19 19:08:57, rhashimoto wrote: > Sorry, there was one other issue. MenuModel::GetFirstItemIndex() takes a ...
9 years, 7 months ago (2011-05-19 20:43:25 UTC) #4
rhashimoto
Hi Scott - Sorry for being dense but I'm having a little trouble grokking your ...
9 years, 7 months ago (2011-05-21 00:40:12 UTC) #5
sky
On Fri, May 20, 2011 at 5:40 PM, <rhashimoto@chromium.org> wrote: > Hi Scott - > ...
9 years, 7 months ago (2011-05-23 14:26:44 UTC) #6
rhashimoto
Hi Scott - I'm now using the views::MenuModelAdapter committed in http://codereview.chromium.org/7067032/ to convert ButtonDropDown. It ...
9 years, 6 months ago (2011-05-31 22:49:23 UTC) #7
sky
LGTM http://codereview.chromium.org/7044016/diff/26001/chrome/browser/ui/views/button_dropdown_test.cc File chrome/browser/ui/views/button_dropdown_test.cc (right): http://codereview.chromium.org/7044016/diff/26001/chrome/browser/ui/views/button_dropdown_test.cc#newcode15 chrome/browser/ui/views/button_dropdown_test.cc:15: ButtonDropDownDragTest() : button_(NULL), nit: if you can't fit ...
9 years, 6 months ago (2011-05-31 23:10:40 UTC) #8
rhashimoto
http://codereview.chromium.org/7044016/diff/26001/chrome/browser/ui/views/button_dropdown_test.cc File chrome/browser/ui/views/button_dropdown_test.cc (right): http://codereview.chromium.org/7044016/diff/26001/chrome/browser/ui/views/button_dropdown_test.cc#newcode15 chrome/browser/ui/views/button_dropdown_test.cc:15: ButtonDropDownDragTest() : button_(NULL), On 2011/05/31 23:10:40, sky wrote: > ...
9 years, 6 months ago (2011-05-31 23:36:47 UTC) #9
commit-bot: I haz the power
9 years, 6 months ago (2011-06-01 16:57:08 UTC) #10
Change committed as 87490

Powered by Google App Engine
This is Rietveld 408576698