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

Issue 267593005: Refactor menu controller to isolate aura dependency. (Closed)

Created:
6 years, 7 months ago by Andre
Modified:
6 years, 7 months ago
CC:
chromium-reviews, sadrul, ben+aura_chromium.org, tfarina, kalyank, mac-views-reviews_chromium.org
Visibility:
Public.

Description

Refactor menu controller to isolate aura dependency. We want to run menus without aura for the mac port of views. This change allows menus to run with or without aura. This is accomplished by introducing a MenuMessageLoop interface to abstract the platform-dependent parts of the menu controller. It is responsible for running and quitting the nested message loop, and reposting events. BUG=366007 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270881

Patch Set 1 #

Total comments: 5

Patch Set 2 : Removing ifdefs, work in progress #

Total comments: 26

Patch Set 3 : Cleanup #

Total comments: 19

Patch Set 4 : Rebase to master. Fixes for tapted. #

Total comments: 11

Patch Set 5 : Fixes for tapted and trybots, plus rebase #

Total comments: 2

Patch Set 6 : Fix missing initializer #

Total comments: 1

Patch Set 7 : Formatting and mac compile fixes. #

Patch Set 8 : Rebase and merge with http://crrev.com/269819 #

Total comments: 25

Patch Set 9 : Fixes for sky #

Patch Set 10 : More fixes for sky #

Unified diffs Side-by-side diffs Delta from patch set Stats (+423 lines, -164 lines) Patch
A + ui/views/controls/menu/display_change_listener_mac.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -7 lines 0 comments Download
M ui/views/controls/menu/menu_config_mac.cc View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_controller.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 2 3 4 5 6 7 8 9 10 chunks +10 lines, -154 lines 0 comments Download
M ui/views/controls/menu/menu_host.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
A ui/views/controls/menu/menu_message_loop.h View 1 2 3 4 5 6 7 8 9 1 chunk +57 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_message_loop_aura.h View 1 2 3 4 5 6 7 8 9 1 chunk +46 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_message_loop_aura.cc View 1 2 3 4 5 6 7 8 9 1 chunk +195 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_message_loop_mac.h View 1 2 3 4 5 6 7 8 9 1 chunk +35 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_message_loop_mac.cc View 1 2 3 4 5 6 7 8 9 1 chunk +51 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_scroll_view_container.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
Andre
Trent, can you take a first look? https://codereview.chromium.org/267593005/diff/1/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/267593005/diff/1/ui/views/controls/menu/menu_controller.cc#newcode2452 ui/views/controls/menu/menu_controller.cc:2452: return root ...
6 years, 7 months ago (2014-05-01 22:38:43 UTC) #1
tfarina
The subject line should be shorter (72-80 in the max). Could you also add a ...
6 years, 7 months ago (2014-05-01 22:42:02 UTC) #2
Andre
On 2014/05/01 22:42:02, tfarina wrote: > The subject line should be shorter (72-80 in the ...
6 years, 7 months ago (2014-05-01 23:02:36 UTC) #3
tapted
https://codereview.chromium.org/267593005/diff/1/ui/aura/env.h File ui/aura/env.h (left): https://codereview.chromium.org/267593005/diff/1/ui/aura/env.h#oldcode42 ui/aura/env.h:42: const int mouse_button_flags() const { return mouse_button_flags_; } yeah ...
6 years, 7 months ago (2014-05-02 00:22:56 UTC) #4
Andre
https://codereview.chromium.org/267593005/diff/20001/ui/views/controls/menu/menu_host.cc File ui/views/controls/menu/menu_host.cc (left): https://codereview.chromium.org/267593005/diff/20001/ui/views/controls/menu/menu_host.cc#oldcode58 ui/views/controls/menu/menu_host.cc:58: SetShadowType(GetNativeView(), wm::SHADOW_TYPE_NONE); Moved this to InitNativeWidget(). https://codereview.chromium.org/267593005/diff/20001/ui/views/controls/menu/menu_host.cc File ui/views/controls/menu/menu_host.cc ...
6 years, 7 months ago (2014-05-04 20:05:30 UTC) #5
tapted
https://codereview.chromium.org/267593005/diff/20001/ui/views/controls/menu/menu_config_mac.cc File ui/views/controls/menu/menu_config_mac.cc (right): https://codereview.chromium.org/267593005/diff/20001/ui/views/controls/menu/menu_config_mac.cc#newcode35 ui/views/controls/menu/menu_config_mac.cc:35: static MenuConfig* views_instance = NULL; This should probably be ...
6 years, 7 months ago (2014-05-04 23:43:39 UTC) #6
Andre
https://codereview.chromium.org/267593005/diff/20001/ui/views/controls/menu/menu_config_mac.cc File ui/views/controls/menu/menu_config_mac.cc (right): https://codereview.chromium.org/267593005/diff/20001/ui/views/controls/menu/menu_config_mac.cc#newcode35 ui/views/controls/menu/menu_config_mac.cc:35: static MenuConfig* views_instance = NULL; On 2014/05/04 23:43:39, tapted ...
6 years, 7 months ago (2014-05-05 22:41:28 UTC) #7
tapted
nice! Looks really good. I just have some nits, but we should rebase off master ...
6 years, 7 months ago (2014-05-06 00:02:45 UTC) #8
Andre
On 2014/05/06 00:02:45, tapted wrote: > nice! Looks really good. I just have some nits, ...
6 years, 7 months ago (2014-05-06 00:08:47 UTC) #9
Andre
Rebased off master. https://codereview.chromium.org/267593005/diff/120001/ui/aura/env.h File ui/aura/env.h (right): https://codereview.chromium.org/267593005/diff/120001/ui/aura/env.h#newcode42 ui/aura/env.h:42: int mouse_button_flags() const { return mouse_button_flags_; ...
6 years, 7 months ago (2014-05-07 23:12:38 UTC) #10
tapted
lgtm Maybe add a brief "how" summary in the CL description - a good CL ...
6 years, 7 months ago (2014-05-08 00:25:28 UTC) #11
Andre
On 2014/05/08 00:25:28, tapted wrote: > lgtm > > Maybe add a brief "how" summary ...
6 years, 7 months ago (2014-05-09 01:09:50 UTC) #12
Andre
https://codereview.chromium.org/267593005/diff/130001/ui/views/controls/menu/display_change_listener_mac.cc File ui/views/controls/menu/display_change_listener_mac.cc (right): https://codereview.chromium.org/267593005/diff/130001/ui/views/controls/menu/display_change_listener_mac.cc#newcode1 ui/views/controls/menu/display_change_listener_mac.cc:1: // Copyright (c) 2014 The Chromium Authors. All rights ...
6 years, 7 months ago (2014-05-09 01:10:00 UTC) #13
tapted
slgtm with the following https://codereview.chromium.org/267593005/diff/200001/ui/views/controls/menu/menu_message_loop_mac.cc File ui/views/controls/menu/menu_message_loop_mac.cc (right): https://codereview.chromium.org/267593005/diff/200001/ui/views/controls/menu/menu_message_loop_mac.cc#newcode17 ui/views/controls/menu/menu_message_loop_mac.cc:17: MenuMessageLoopMac::MenuMessageLoopMac() {} message_loop_depth_ needs an ...
6 years, 7 months ago (2014-05-09 03:07:57 UTC) #14
Andre
On 2014/05/09 03:07:57, tapted wrote: > slgtm with the following > > https://codereview.chromium.org/267593005/diff/200001/ui/views/controls/menu/menu_message_loop_mac.cc > File ...
6 years, 7 months ago (2014-05-09 03:57:18 UTC) #15
Andre
https://codereview.chromium.org/267593005/diff/200001/ui/views/controls/menu/menu_message_loop_mac.cc File ui/views/controls/menu/menu_message_loop_mac.cc (right): https://codereview.chromium.org/267593005/diff/200001/ui/views/controls/menu/menu_message_loop_mac.cc#newcode17 ui/views/controls/menu/menu_message_loop_mac.cc:17: MenuMessageLoopMac::MenuMessageLoopMac() {} On 2014/05/09 03:07:58, tapted wrote: > message_loop_depth_ ...
6 years, 7 months ago (2014-05-09 04:08:47 UTC) #16
Andre
Ben, I think this is ready for you to review. Please take a look.
6 years, 7 months ago (2014-05-09 23:15:28 UTC) #17
Andre
https://codereview.chromium.org/267593005/diff/240001/ui/views/controls/menu/menu_host.cc File ui/views/controls/menu/menu_host.cc (right): https://codereview.chromium.org/267593005/diff/240001/ui/views/controls/menu/menu_host.cc#newcode77 ui/views/controls/menu/menu_host.cc:77: ui::GestureRecognizer::Get()->TransferEventsTo(NULL, NULL); The first argument is ignored if the ...
6 years, 7 months ago (2014-05-12 17:38:38 UTC) #18
tapted
note there's a recent change in http://crrev.com/269819 that will need to be incorporated.
6 years, 7 months ago (2014-05-14 06:41:38 UTC) #19
Ben Goodger (Google)
menu: -me, +sky
6 years, 7 months ago (2014-05-14 19:09:44 UTC) #20
Andre
On 2014/05/14 19:09:44, Ben Goodger (Google) wrote: > menu: -me, +sky +sadrul, I see you ...
6 years, 7 months ago (2014-05-14 23:26:06 UTC) #21
sky
How about pulling SetHasActivationShadow into its own cl since it's not really related to the ...
6 years, 7 months ago (2014-05-15 16:07:31 UTC) #22
sadrul
> +sadrul, I see you are working on https://codereview.chromium.org/280483003 > which is touching the same ...
6 years, 7 months ago (2014-05-15 16:53:08 UTC) #23
sky
On Thu, May 15, 2014 at 9:53 AM, <sadrul@chromium.org> wrote: >> +sadrul, I see you ...
6 years, 7 months ago (2014-05-15 16:57:46 UTC) #24
Andre
On 2014/05/15 16:53:08, sadrul wrote: > > +sadrul, I see you are working on https://codereview.chromium.org/280483003 ...
6 years, 7 months ago (2014-05-15 17:22:11 UTC) #25
Andre
On 2014/05/15 16:07:31, sky wrote: > How about pulling SetHasActivationShadow into its own cl since ...
6 years, 7 months ago (2014-05-15 18:45:44 UTC) #26
Andre
https://codereview.chromium.org/267593005/diff/330001/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/267593005/diff/330001/ui/views/controls/menu/menu_controller.cc#newcode791 ui/views/controls/menu/menu_controller.cc:791: owner_ = NULL; On 2014/05/15 16:07:32, sky wrote: > ...
6 years, 7 months ago (2014-05-15 18:45:59 UTC) #27
sky
https://codereview.chromium.org/267593005/diff/330001/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/267593005/diff/330001/ui/views/controls/menu/menu_controller.cc#newcode791 ui/views/controls/menu/menu_controller.cc:791: owner_ = NULL; On 2014/05/15 18:45:59, Andre wrote: > ...
6 years, 7 months ago (2014-05-15 19:33:01 UTC) #28
Andre
https://codereview.chromium.org/267593005/diff/330001/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/267593005/diff/330001/ui/views/controls/menu/menu_controller.cc#newcode791 ui/views/controls/menu/menu_controller.cc:791: owner_ = NULL; On 2014/05/15 19:33:01, sky wrote: > ...
6 years, 7 months ago (2014-05-15 20:57:12 UTC) #29
sky
LGTM
6 years, 7 months ago (2014-05-15 22:38:27 UTC) #30
Andre
The CQ bit was checked by andresantoso@chromium.org
6 years, 7 months ago (2014-05-15 22:39:05 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/andresantoso@chromium.org/267593005/370001
6 years, 7 months ago (2014-05-15 22:41:01 UTC) #32
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-15 23:36:15 UTC) #33
commit-bot: I haz the power
6 years, 7 months ago (2014-05-16 00:51:06 UTC) #34
Message was sent while issue was closed.
Change committed as 270881

Powered by Google App Engine
This is Rietveld 408576698