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

Issue 7067032: Add MenuModelAdapter to wrap ui::MenuModel with views::MenuDelegate interface. (Closed)

Created:
9 years, 7 months ago by rhashimoto
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Add MenuModelAdapter to wrap ui::MenuModel with views::MenuDelegate interface. - added ViewsDelegate::GetDispositionForEvent() pure virtual - added MenuModelAdapter - added unit test for MenuModelAdapter - added comment for MenuModel::GetFirstItemIndex() that callers may pass NULL for NativeMenu argument - fixed index offset bug in MenuModel::GetModelAndIndexForCommandId() - fixed spurious call to MenuDelegate::IsCommandEnabled() BUG=none TEST=included Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86677

Patch Set 1 #

Patch Set 2 : Fix unit_tests build. #

Patch Set 3 : Fix ui_interactive_tests build. #

Patch Set 4 : Restore NOTREACHED() in IsCommandEnabled(). #

Total comments: 20

Patch Set 5 : Implemented reviewer recommendations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+568 lines, -16 lines) Patch
M chrome/browser/ui/views/accessibility_event_router_views_unittest.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/chrome_views_delegate.h View 1 2 3 4 2 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/chrome_views_delegate.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M ui/base/models/menu_model.h View 1 chunk +2 lines, -1 line 0 comments Download
M ui/base/models/menu_model.cc View 1 2 3 4 1 chunk +7 lines, -5 lines 0 comments Download
M views/controls/menu/menu_item_view.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
A views/controls/menu/menu_model_adapter.h View 1 2 3 4 1 chunk +65 lines, -0 lines 0 comments Download
A views/controls/menu/menu_model_adapter.cc View 1 2 3 1 chunk +167 lines, -0 lines 0 comments Download
A views/controls/menu/menu_model_adapter_unittest.cc View 1 2 3 4 1 chunk +289 lines, -0 lines 0 comments Download
M views/test/test_views_delegate.h View 1 chunk +4 lines, -0 lines 0 comments Download
M views/views.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
M views/views_delegate.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
rhashimoto
Hi Scott - I've attempted to follow your recommendations from http://codereview.chromium.org/7044016/ to create a wrapper ...
9 years, 7 months ago (2011-05-24 23:21:44 UTC) #1
sky
LGTM http://codereview.chromium.org/7067032/diff/5002/chrome/browser/ui/views/chrome_views_delegate.h File chrome/browser/ui/views/chrome_views_delegate.h (right): http://codereview.chromium.org/7067032/diff/5002/chrome/browser/ui/views/chrome_views_delegate.h#newcode51 chrome/browser/ui/views/chrome_views_delegate.h:51: virtual int GetDispositionForEvent(int event_flags) OVERRIDE; It looks weird ...
9 years, 7 months ago (2011-05-25 15:41:12 UTC) #2
rhashimoto
Thanks, Scott! http://codereview.chromium.org/7067032/diff/5002/chrome/browser/ui/views/chrome_views_delegate.h File chrome/browser/ui/views/chrome_views_delegate.h (right): http://codereview.chromium.org/7067032/diff/5002/chrome/browser/ui/views/chrome_views_delegate.h#newcode51 chrome/browser/ui/views/chrome_views_delegate.h:51: virtual int GetDispositionForEvent(int event_flags) OVERRIDE; On 2011/05/25 ...
9 years, 7 months ago (2011-05-25 16:24:36 UTC) #3
commit-bot: I haz the power
9 years, 7 months ago (2011-05-25 19:41:37 UTC) #4
Change committed as 86677

Powered by Google App Engine
This is Rietveld 408576698