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

Issue 331993009: MacViews: Run native Cocoa context menus to support Services. (Closed)

Created:
6 years, 6 months ago by Andre
Modified:
6 years, 5 months ago
CC:
chromium-reviews, tfarina, mac-views-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

MacViews: Run native Cocoa context menus to support Services. The way AppKit populate context menus with Services items is not exposed, so it is not currently possible to get Mac Services integration without using NSMenu. With this change we now use NSMenu when running context menus, while still running the non-native views one everywhere else like Combobox. This is achieved by splitting the interface of MenuRunnerImpl into an abstract MenuRunnerImplInterface, and making a concrete implementation MenuRunnerImplCocoa that runs a native context menu. BUG=388455 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283999

Patch Set 1 : #

Total comments: 19

Patch Set 2 : Try moving run types to constructor #

Patch Set 3 : #

Patch Set 4 : Add unit test. #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : Rebase, don't run native menu when nested #

Patch Set 8 : Add VIEWS_EXPORT for unit test access #

Total comments: 11

Patch Set 9 : Rebase. Fixes for sky. #

Total comments: 2

Patch Set 10 : Rebase off 393943006 #

Patch Set 11 : Rebase to master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+761 lines, -282 lines) Patch
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +44 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_runner.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M ui/views/controls/menu/menu_runner.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -278 lines 0 comments Download
A ui/views/controls/menu/menu_runner_cocoa_unittest.mm View 1 2 3 4 5 6 7 8 9 1 chunk +107 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_runner_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +94 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_runner_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +217 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_runner_impl_adapter.h View 1 2 3 4 5 6 7 8 9 1 chunk +43 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_runner_impl_adapter.cc View 1 2 3 4 5 6 7 8 9 1 chunk +48 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_runner_impl_cocoa.h View 1 2 3 4 5 6 7 8 9 1 chunk +51 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_runner_impl_cocoa.mm View 1 2 3 4 5 6 7 8 9 1 chunk +82 lines, -0 lines 0 comments Download
A ui/views/controls/menu/menu_runner_impl_interface.h View 1 2 3 4 5 6 7 8 9 1 chunk +55 lines, -0 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 38 (0 generated)
Andre
Trent, can I get your opinion on this approach?
6 years, 6 months ago (2014-06-24 23:00:32 UTC) #1
tapted
lg at a high level - I think this is a pretty nice approach. I'll ...
6 years, 6 months ago (2014-06-24 23:28:08 UTC) #2
tapted
We should add some tests for this too (maybe after getting a goahead from sky), ...
6 years, 6 months ago (2014-06-25 08:30:29 UTC) #3
Andre
Trent, I'm still not done with this but I've made more changes so you might ...
6 years, 5 months ago (2014-06-27 01:18:08 UTC) #4
tapted
I think it's looking good - the approach looks promising. We just need to get ...
6 years, 5 months ago (2014-06-27 11:14:35 UTC) #5
Andre
sky, can we get your input on this? It's not quite complete but we'd like ...
6 years, 5 months ago (2014-06-27 22:36:59 UTC) #6
sky
If we go this route, how will the nested message loop be impacted when the ...
6 years, 5 months ago (2014-07-09 17:20:39 UTC) #7
pink (ping after 24hrs)
It may not be used often, but for those who do use it, this type ...
6 years, 5 months ago (2014-07-09 17:47:00 UTC) #8
Andre
On 2014/07/09 17:20:39, sky wrote: > If we go this route, how will the nested ...
6 years, 5 months ago (2014-07-09 18:26:49 UTC) #9
sky
Do we show services in all context menus, or just certain ones? On Wed, Jul ...
6 years, 5 months ago (2014-07-09 21:31:33 UTC) #10
sky
On Wed, Jul 9, 2014 at 11:26 AM, <andresantoso@chromium.org> wrote: > On 2014/07/09 17:20:39, sky ...
6 years, 5 months ago (2014-07-09 21:47:33 UTC) #11
Andre
On 2014/07/09 21:47:33, sky wrote: > On Wed, Jul 9, 2014 at 11:26 AM, <mailto:andresantoso@chromium.org> ...
6 years, 5 months ago (2014-07-09 23:23:00 UTC) #12
Andre
On 2014/07/09 23:23:00, Andre wrote: > On 2014/07/09 21:47:33, sky wrote: > > On Wed, ...
6 years, 5 months ago (2014-07-14 06:51:38 UTC) #13
sky
On Sun, Jul 13, 2014 at 11:51 PM, <andresantoso@chromium.org> wrote: > On 2014/07/09 23:23:00, Andre ...
6 years, 5 months ago (2014-07-14 17:09:44 UTC) #14
pink (ping after 24hrs)
Also the omnibox (since it's a text field). On Mon, Jul 14, 2014 at 1:09 ...
6 years, 5 months ago (2014-07-14 17:12:08 UTC) #15
Andre
Right, content and omnibox are the main ones. It's also shown whenever we show a ...
6 years, 5 months ago (2014-07-14 17:37:31 UTC) #16
sky
Ok, sounds like we have to go this route. Could you break this up into ...
6 years, 5 months ago (2014-07-14 21:02:23 UTC) #17
Andre
On 2014/07/14 21:02:23, sky wrote: > Ok, sounds like we have to go this route. ...
6 years, 5 months ago (2014-07-14 22:59:28 UTC) #18
Andre
https://codereview.chromium.org/331993009/diff/390001/ui/views/controls/menu/menu_runner.h File ui/views/controls/menu/menu_runner.h (right): https://codereview.chromium.org/331993009/diff/390001/ui/views/controls/menu/menu_runner.h#newcode139 ui/views/controls/menu/menu_runner.h:139: internal::MenuRunnerImplInterface* holder_; On 2014/07/14 21:02:22, sky wrote: > holder_ ...
6 years, 5 months ago (2014-07-14 22:59:43 UTC) #19
sky
https://codereview.chromium.org/331993009/diff/390001/ui/views/controls/menu/menu_runner_impl_adapter.h File ui/views/controls/menu/menu_runner_impl_adapter.h (right): https://codereview.chromium.org/331993009/diff/390001/ui/views/controls/menu/menu_runner_impl_adapter.h#newcode16 ui/views/controls/menu/menu_runner_impl_adapter.h:16: class MenuRunnerImplAdapter : public MenuRunnerImplInterface { On 2014/07/14 22:59:42, ...
6 years, 5 months ago (2014-07-15 04:33:44 UTC) #20
Andre
On 2014/07/15 04:33:44, sky wrote: > https://codereview.chromium.org/331993009/diff/390001/ui/views/controls/menu/menu_runner_impl_adapter.h > File ui/views/controls/menu/menu_runner_impl_adapter.h (right): > > https://codereview.chromium.org/331993009/diff/390001/ui/views/controls/menu/menu_runner_impl_adapter.h#newcode16 > ...
6 years, 5 months ago (2014-07-15 04:44:29 UTC) #21
sky
On Mon, Jul 14, 2014 at 9:44 PM, <andresantoso@chromium.org> wrote: > On 2014/07/15 04:33:44, sky ...
6 years, 5 months ago (2014-07-15 16:13:26 UTC) #22
Andre
On 2014/07/15 16:13:26, sky wrote: > > You said: "I created this mainly so that ...
6 years, 5 months ago (2014-07-15 18:09:59 UTC) #23
sky
Ok, I think I get why you did it the way you did. I think ...
6 years, 5 months ago (2014-07-15 20:36:39 UTC) #24
Andre
On 2014/07/15 20:36:39, sky wrote: > Ok, I think I get why you did it ...
6 years, 5 months ago (2014-07-15 22:23:27 UTC) #25
Andre
Scott PTAL. I've rebased this patch off https://codereview.chromium.org/393943006. https://codereview.chromium.org/331993009/diff/450001/ui/views/controls/menu/menu_runner_impl_interface.h File ui/views/controls/menu/menu_runner_impl_interface.h (right): https://codereview.chromium.org/331993009/diff/450001/ui/views/controls/menu/menu_runner_impl_interface.h#newcode29 ui/views/controls/menu/menu_runner_impl_interface.h:29: virtual ...
6 years, 5 months ago (2014-07-16 18:43:28 UTC) #26
sky
Nice, LGTM
6 years, 5 months ago (2014-07-16 19:36:49 UTC) #27
Andre
On 2014/07/16 19:36:49, sky wrote: > Nice, LGTM Thanks! Can you LGTM https://codereview.chromium.org/393943006/ as well? ...
6 years, 5 months ago (2014-07-16 22:10:01 UTC) #28
Andre
The CQ bit was checked by andresantoso@chromium.org
6 years, 5 months ago (2014-07-17 05:13:13 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/andresantoso@chromium.org/331993009/470001
6 years, 5 months ago (2014-07-17 05:16:46 UTC) #30
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 5 months ago (2014-07-17 05:53:03 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-17 05:55:57 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/93453) android_chromium_gn_compile_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_chromium_gn_compile_rel/builds/23229) android_clang_dbg ...
6 years, 5 months ago (2014-07-17 05:55:58 UTC) #33
Andre
The CQ bit was unchecked by andresantoso@chromium.org
6 years, 5 months ago (2014-07-17 05:56:34 UTC) #34
Andre
The CQ bit was checked by andresantoso@chromium.org
6 years, 5 months ago (2014-07-17 18:11:27 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/andresantoso@chromium.org/331993009/490001
6 years, 5 months ago (2014-07-17 18:12:35 UTC) #36
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-18 00:02:34 UTC) #37
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 03:43:21 UTC) #38
Message was sent while issue was closed.
Change committed as 283999

Powered by Google App Engine
This is Rietveld 408576698