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

Issue 119237: A new menu system. (Closed)

Created:
11 years, 6 months ago by Ben Goodger (Google)
Modified:
9 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

A new menu system for views. This is all the functionality needed for the page, app menus and browser system menus. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=17895

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Total comments: 19

Patch Set 18 : '' #

Patch Set 19 : '' #

Total comments: 2

Patch Set 20 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1224 lines, -2 lines) Patch
M base/gfx/native_widget_types.h View 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
A views/controls/menu/menu_2.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +148 lines, -0 lines 0 comments Download
A views/controls/menu/menu_2.cc View 3 4 5 6 7 8 9 10 11 12 13 1 chunk +62 lines, -0 lines 0 comments Download
A views/controls/menu/native_menu_gtk.h View 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +59 lines, -0 lines 0 comments Download
A views/controls/menu/native_menu_gtk.cc View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +233 lines, -0 lines 0 comments Download
A views/controls/menu/native_menu_win.h View 3 4 5 6 7 8 9 10 11 1 chunk +140 lines, -0 lines 0 comments Download
A views/controls/menu/native_menu_win.cc View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +346 lines, -0 lines 0 comments Download
A views/controls/menu/simple_menu_model.h View 1 chunk +93 lines, -0 lines 0 comments Download
A views/controls/menu/simple_menu_model.cc View 1 chunk +129 lines, -0 lines 0 comments Download
M views/view.h View 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M views/view.cc View 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M views/views.gyp View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
sky
This all sounds reasonable to me. The only substantial comment I have is that I ...
11 years, 6 months ago (2009-06-05 15:54:37 UTC) #1
Ben Goodger (Google)
11 years, 6 months ago (2009-06-06 23:01:18 UTC) #2
sky
Looks like you forgot to include controls/menu/menu_2.cc in this patch. http://codereview.chromium.org/119237/diff/188/198 File base/gfx/native_widget_types.h (right): http://codereview.chromium.org/119237/diff/188/198#newcode78 ...
11 years, 6 months ago (2009-06-08 16:41:34 UTC) #3
Ben Goodger (Google)
updated and added comments... http://codereview.chromium.org/119237/diff/188/198 File base/gfx/native_widget_types.h (right): http://codereview.chromium.org/119237/diff/188/198#newcode78 Line 78: typedef GtkWidget* NativeMenu; Nope. ...
11 years, 6 months ago (2009-06-08 18:54:48 UTC) #4
sky
11 years, 6 months ago (2009-06-08 19:30:23 UTC) #5
LGTM with the following changes.

http://codereview.chromium.org/119237/diff/188/193
File views/controls/menu/native_menu_gtk.cc (right):

http://codereview.chromium.org/119237/diff/188/193#newcode168
Line 168: if (gtk_menu_item_get_submenu(GTK_MENU_ITEM(menu_item))) {
On 2009/06/08 18:54:48, Ben Goodger wrote:
> On 2009/06/08 16:41:34, sky wrote:
> > Doesn't this return the menu, so that you don't need "submenu"?
> 
> gtk_menu_item_get_submenu returns non-NULL if the menu_item has a submenu.
> That's all the information I need... maybe I'm not understanding your
question?

I'm stupid here, nevermind.

http://codereview.chromium.org/119237/diff/210/1213
File views/controls/menu/menu_2.h (right):

http://codereview.chromium.org/119237/diff/210/1213#newcode88
Line 88: virtual Menu2Model* GetSubmenuModelAt(int index) const = 0;
I think it's worth mentioning ownership here.

http://codereview.chromium.org/119237/diff/210/1213#newcode141
Line 141: MenuWrapper* wrapper_;
It looks like this gets leaked. Should this be scoped_ptr?

Powered by Google App Engine
This is Rietveld 408576698