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

Issue 7016042: Convert NetworkMenu from Menu2 to MenuItemView. (Closed)

Created:
9 years, 7 months ago by rhashimoto
Modified:
9 years, 6 months ago
CC:
chromium-reviews, davemoore+watch_chromium.org, James Cook, Charlie Lee, oshima
Visibility:
Public.

Description

Convert NetworkMenu from Menu2 to MenuItemView. This CL depends on http://codereview.chromium.org/6931039/ to handle changes to MenuItemView menus while the menu is open. It includes a default minimum width setting on the menu to avoid unnecessary resizing. I have tested network names with ampersands and they display correctly with the same escaping code as before. BUG=chromium-os:13887, chromium-os:12988 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86434

Patch Set 1 #

Patch Set 2 : Clean up dead code. #

Patch Set 3 : Rebase to trunk. #

Patch Set 4 : Rebase to trunk. #

Total comments: 14

Patch Set 5 : Ensure that menu updates are done in the UI thread. #

Patch Set 6 : Incorporate reviewer recommendations. #

Patch Set 7 : Whitespace fix. #

Total comments: 8

Patch Set 8 : Fix code path errors after removal of returns. #

Patch Set 9 : Undo proxying onto UI thread, just DCHECK. #

Patch Set 10 : Undo undesired power menu edits. #

Patch Set 11 : Undo undesired power menu edits. #

Total comments: 2

Patch Set 12 : Fix indentation. #

Patch Set 13 : Tweak menu vertical spacing. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+361 lines, -214 lines) Patch
M chrome/browser/chromeos/status/network_dropdown_button.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/status/network_dropdown_button.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/status/network_menu.h View 1 2 3 5 6 7 8 3 chunks +14 lines, -137 lines 0 comments Download
M chrome/browser/chromeos/status/network_menu.cc View 1 2 3 4 5 6 7 8 9 10 11 12 20 chunks +337 lines, -77 lines 2 comments Download
M chrome/browser/chromeos/status/network_menu_button.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/status/network_menu_button.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
rhashimoto
Hi Steven - This is another try at converting the NetworkMenu to from Menu2 to ...
9 years, 7 months ago (2011-05-16 19:20:48 UTC) #1
rhashimoto
Hi Steven, Charlie - Steven, did you add Charlie as a reviewer for this CL? ...
9 years, 7 months ago (2011-05-18 15:57:42 UTC) #2
stevenjb
I added charlie in case he had a chance to review this before I did. ...
9 years, 7 months ago (2011-05-18 17:36:14 UTC) #3
rhashimoto
Patch 5 guarantees that changes to the menu items are done in the UI thread ...
9 years, 7 months ago (2011-05-18 17:40:47 UTC) #4
rhashimoto
http://codereview.chromium.org/7016042/diff/4002/chrome/browser/chromeos/status/network_menu.cc File chrome/browser/chromeos/status/network_menu.cc (right): http://codereview.chromium.org/7016042/diff/4002/chrome/browser/chromeos/status/network_menu.cc#newcode90 chrome/browser/chromeos/status/network_menu.cc:90: bool ConnectToNetworkAt(int index, On 2011/05/18 17:36:15, Steven Bennetts wrote: ...
9 years, 7 months ago (2011-05-18 18:15:45 UTC) #5
stevenjb
+oshima - do we need the proxying? It seems like UpdateMenu() would always be called ...
9 years, 7 months ago (2011-05-18 18:43:36 UTC) #6
rhashimoto
> +oshima - do we need the proxying? It seems like UpdateMenu() would always be ...
9 years, 7 months ago (2011-05-19 00:36:54 UTC) #7
stevenjb
All DBus calls need to happen on the UI thread, so CellularDataPlanObserver calls should also ...
9 years, 7 months ago (2011-05-19 01:31:05 UTC) #8
rhashimoto
On 2011/05/19 01:31:05, Steven Bennetts wrote: > All DBus calls need to happen on the ...
9 years, 7 months ago (2011-05-19 16:05:56 UTC) #9
stevenjb
LGTM with nit http://codereview.chromium.org/7016042/diff/21001/chrome/browser/chromeos/status/network_menu.cc File chrome/browser/chromeos/status/network_menu.cc (right): http://codereview.chromium.org/7016042/diff/21001/chrome/browser/chromeos/status/network_menu.cc#newcode292 chrome/browser/chromeos/status/network_menu.cc:292: SkBitmap icon; nit: 2 space indentation ...
9 years, 7 months ago (2011-05-19 20:13:05 UTC) #10
rhashimoto
http://codereview.chromium.org/7016042/diff/21001/chrome/browser/chromeos/status/network_menu.cc File chrome/browser/chromeos/status/network_menu.cc (right): http://codereview.chromium.org/7016042/diff/21001/chrome/browser/chromeos/status/network_menu.cc#newcode292 chrome/browser/chromeos/status/network_menu.cc:292: SkBitmap icon; On 2011/05/19 20:13:05, Steven Bennetts wrote: > ...
9 years, 7 months ago (2011-05-20 00:36:41 UTC) #11
rhashimoto
Hi Zel - Can you please review Patch 13, which sets the network menu vertical ...
9 years, 7 months ago (2011-05-23 16:23:24 UTC) #12
zel
On 2011/05/23 16:23:24, rhashimoto wrote: > Hi Zel - > > Can you please review ...
9 years, 7 months ago (2011-05-23 16:33:37 UTC) #13
commit-bot: I haz the power
Change committed as 86434
9 years, 7 months ago (2011-05-24 16:32:53 UTC) #14
Nikita (slow)
http://codereview.chromium.org/7016042/diff/24001/chrome/browser/chromeos/status/network_menu.cc File chrome/browser/chromeos/status/network_menu.cc (right): http://codereview.chromium.org/7016042/diff/24001/chrome/browser/chromeos/status/network_menu.cc#newcode65 chrome/browser/chromeos/status/network_menu.cc:65: class NetworkMenuModel : public views::MenuDelegate { What was the ...
9 years, 6 months ago (2011-05-30 11:32:53 UTC) #15
Nikita (slow)
http://codereview.chromium.org/7016042/diff/24001/chrome/browser/chromeos/status/network_menu.cc File chrome/browser/chromeos/status/network_menu.cc (right): http://codereview.chromium.org/7016042/diff/24001/chrome/browser/chromeos/status/network_menu.cc#newcode415 chrome/browser/chromeos/status/network_menu.cc:415: // NetworkMenuModel, ui::MenuModel implementation: Note, comment is incorrect now. ...
9 years, 6 months ago (2011-05-30 11:45:03 UTC) #16
rhashimoto1
9 years, 6 months ago (2011-05-31 15:36:36 UTC) #17
On Mon, May 30, 2011 at 4:32 AM,  <nkostylev@chromium.org> wrote:
http://codereview.chromium.org/7016042/diff/24001/chrome/browser/chromeos/sta...
> chrome/browser/chromeos/status/network_menu.cc:65: class
> NetworkMenuModel : public views::MenuDelegate {
> What was the reason for dropping ui::MenuModel interface?

It was only that the views::MenuItemView menu implementation uses
views::MenuDelegate rather than ui::MenuModel.  At the time I thought
that MenuDelegate was the latest menu definition interface but I have
since been told that ui::MenuModel is newer.  I have written an
adapter class that wraps a ui::MenuModel in a views::MenuDelegate
interface but it is not quite ready to go yet.

Roy

Powered by Google App Engine
This is Rietveld 408576698