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

Issue 7005006: Add options menu on Windows. (Closed)

Created:
9 years, 7 months ago by jianli
Modified:
9 years, 6 months ago
Reviewers:
jennb
CC:
chromium-reviews, Paweł Hajdan Jr., dcheng
Visibility:
Public.

Description

Add options menu for panels on Windows. BUG=none TEST=panel_browser_view_browsertest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85006

Patch Set 1 #

Total comments: 18

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 15
Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -9 lines) Patch
M chrome/app/generated_resources.grd View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel_browser_frame_view.h View 1 2 7 chunks +28 lines, -0 lines 2 comments Download
M chrome/browser/ui/panels/panel_browser_frame_view.cc View 1 2 4 chunks +93 lines, -1 line 7 comments Download
M chrome/browser/ui/panels/panel_browser_view.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel_browser_view_browsertest.cc View 1 2 3 chunks +100 lines, -8 lines 6 comments Download

Messages

Total messages: 5 (0 generated)
jianli
9 years, 7 months ago (2011-05-10 20:52:50 UTC) #1
jennb
http://codereview.chromium.org/7005006/diff/1/chrome/browser/ui/panels/panel_browser_frame_view.cc File chrome/browser/ui/panels/panel_browser_frame_view.cc (right): http://codereview.chromium.org/7005006/diff/1/chrome/browser/ui/panels/panel_browser_frame_view.cc#newcode23 chrome/browser/ui/panels/panel_browser_frame_view.cc:23: #include "views/controls/menu/menu_2.h" alpha ordering wrong http://codereview.chromium.org/7005006/diff/1/chrome/browser/ui/panels/panel_browser_frame_view.cc#newcode365 chrome/browser/ui/panels/panel_browser_frame_view.cc:365: // Currently ...
9 years, 7 months ago (2011-05-10 22:38:44 UTC) #2
jianli
http://codereview.chromium.org/7005006/diff/1/chrome/browser/ui/panels/panel_browser_frame_view.cc File chrome/browser/ui/panels/panel_browser_frame_view.cc (right): http://codereview.chromium.org/7005006/diff/1/chrome/browser/ui/panels/panel_browser_frame_view.cc#newcode23 chrome/browser/ui/panels/panel_browser_frame_view.cc:23: #include "views/controls/menu/menu_2.h" On 2011/05/10 22:38:44, jennb wrote: > alpha ...
9 years, 7 months ago (2011-05-10 23:46:58 UTC) #3
jennb
LGTM Some comments are repeats of what we already talked about. I only put them ...
9 years, 7 months ago (2011-05-11 18:06:10 UTC) #4
jianli
9 years, 7 months ago (2011-05-11 18:31:30 UTC) #5
Will commit with all the issues addressed.

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
File chrome/browser/ui/panels/panel_browser_frame_view.cc (right):

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
chrome/browser/ui/panels/panel_browser_frame_view.cc:23: #include
"views/controls/menu/menu_2.h"
On 2011/05/11 18:06:10, jennb wrote:
> I meant this goes below the next line.

Done.

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
chrome/browser/ui/panels/panel_browser_frame_view.cc:559:
options_menu_contents_->AddItem(
On 2011/05/11 18:06:10, jennb wrote:
> It would be easier to read if you did:
> if (should_restore_all)
>   ..AddItem(..., ...GetString...);
> else
>   ...AddItem(...,...GetString...);

Done.

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
chrome/browser/ui/panels/panel_browser_frame_view.cc:574: if
(rebuild_menu_items)
On 2011/05/11 18:06:10, jennb wrote:
> Feels like this method should return true if options_menu needs to be rebuilt.

> Then in CreateOptionsMenu(), call options_menu_->Rebuild() if needed. 
Accessing
> options_menu_ here confuses me when we return from this method to line 528
which
> checks if options_menu_ even exists.

Done. I also renamed CreateOptionsMenu to CreateOrUpdateOptionsMenu and
CreateOptionsMenuItems to CreateOrUpdateOptionsMenuItems. In addition, I moved
the creation of options_menu_contents_ to CreateOrUpdateOptionsMenuItems.

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
File chrome/browser/ui/panels/panel_browser_frame_view.h (right):

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
chrome/browser/ui/panels/panel_browser_frame_view.h:100: static const int
kMinimizeAllCommand = 0;
On 2011/05/11 18:06:10, jennb wrote:
> Forgot to delete these.

Done.

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
File chrome/browser/ui/panels/panel_browser_view_browsertest.cc (right):

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
chrome/browser/ui/panels/panel_browser_view_browsertest.cc:111: -1,
On 2011/05/11 18:06:10, jennb wrote:
> Add // Separator comment here and line 116?

Done.

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
chrome/browser/ui/panels/panel_browser_view_browsertest.cc:126:
arraysize(single_panel_menu),
On 2011/05/11 18:06:10, jennb wrote:
> You could store the sizes in vars up above where you define the  menu arrays
to
> avoid computing arraysize every time.

Done.

http://codereview.chromium.org/7005006/diff/6003/chrome/browser/ui/panels/pan...
chrome/browser/ui/panels/panel_browser_view_browsertest.cc:143: // When we
minimize one panel, "Minimize all" remain intact.
On 2011/05/11 18:06:10, jennb wrote:
> s/remain/remains

Done.

Powered by Google App Engine
This is Rietveld 408576698