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

Issue 678653003: Remove Downcasting RVContextMenuBase in ContextMenuDeleagate implementations. (Closed)

Created:
6 years, 2 months ago by lazyboy
Modified:
6 years, 1 month ago
CC:
chromium-reviews, tfarina, Xi Han
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove Downcasting RVContextMenuBase in ContextMenuDeleagate implementations. ContextMenuDelegate talks in RVCMBase. This is fine for ContextMenuDelegate::BuildMenu, but while showing it through ContextMenuDelegate::ShowMenu, each platform downcasts the RVCMBase to its own variant (RVCMViews, RVCMMac, RVCMImpl), this seems unnecessary since the showing functionality can be moved to RVContextMenuBase. This CL does that and adds a virtual Show() function on RVCMBase. BUG=397364 Test=No visible change should occur. For reference, this CL is related to brining up right-click context menus in chrome. Committed: https://crrev.com/e934d06d39858a9ebfbe2fef35aa16c2084f50e5 Cr-Commit-Position: refs/heads/master@{#301564}

Patch Set 1 #

Patch Set 2 : fixed mac #

Patch Set 3 : fix athena, crashes on menu dismiss tho #

Patch Set 4 : fix double showing on athena #

Patch Set 5 : clean up + git cl format #

Total comments: 2

Patch Set 6 : remove virtual #

Patch Set 7 : fix tests #

Total comments: 3

Patch Set 8 : add RVCMBase::CalculateScreenCoordiantes* #

Patch Set 9 : fix mac compile #

Patch Set 10 : sync @toot #

Total comments: 2

Patch Set 11 : revert back to old patchset #7 #

Patch Set 12 : fix a nit #

Patch Set 13 : sync !tott. #

Patch Set 14 : remove virtual keyword when override is specified #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -88 lines) Patch
M athena/content/render_view_context_menu_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +12 lines, -2 lines 0 comments Download
M athena/content/render_view_context_menu_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +50 lines, -0 lines 0 comments Download
M athena/content/web_contents_view_delegate_factory_impl.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -29 lines 0 comments Download
M chrome/browser/apps/app_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/guest_view/extension_options/chrome_extension_options_guest_delegate.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h View 1 2 3 4 5 6 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc View 1 2 3 4 5 6 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h View 1 2 3 4 5 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.h View 1 2 3 4 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm View 1 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/panels/panel_extension_browsertest.cc View 1 2 3 4 5 6 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc View 1 2 3 4 8 9 10 2 chunks +49 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -32 lines 0 comments Download
M components/renderer_context_menu/context_menu_delegate.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M components/renderer_context_menu/render_view_context_menu_base.h View 1 2 3 4 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (5 generated)
lazyboy
+oshima@ for overall overview and athena/ OWNERS. I'll add other reviewers once you're happy with ...
6 years, 2 months ago (2014-10-24 19:59:07 UTC) #2
oshima
lgtm https://codereview.chromium.org/678653003/diff/80001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h File chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h (right): https://codereview.chromium.org/678653003/diff/80001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h#newcode31 chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h:31: virtual void Show() override; no virtual (new c++11 ...
6 years, 2 months ago (2014-10-24 20:18:38 UTC) #3
lazyboy
+Scott for reviewing chrome/browser/* +Carlos for reviewing components/renderer_context_menu/* https://codereview.chromium.org/678653003/diff/80001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h File chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h (right): https://codereview.chromium.org/678653003/diff/80001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h#newcode31 chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h:31: virtual ...
6 years, 2 months ago (2014-10-24 20:30:32 UTC) #5
cpu_(ooo_6.6-7.5)
lgtm for components/renderer_context_menu
6 years, 2 months ago (2014-10-25 00:38:23 UTC) #6
sky
https://codereview.chromium.org/678653003/diff/120001/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc File chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc (right): https://codereview.chromium.org/678653003/diff/120001/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc#newcode186 chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc:186: gfx::Point screen_point(params().x, params().y); I think you should change ContextMenuParams ...
6 years, 1 month ago (2014-10-25 15:30:04 UTC) #7
lazyboy
https://codereview.chromium.org/678653003/diff/120001/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc File chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc (right): https://codereview.chromium.org/678653003/diff/120001/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc#newcode186 chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc:186: gfx::Point screen_point(params().x, params().y); On 2014/10/25 15:30:04, sky wrote: > ...
6 years, 1 month ago (2014-10-25 18:46:59 UTC) #8
sky
On 2014/10/25 18:46:59, lazyboy wrote: > https://codereview.chromium.org/678653003/diff/120001/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc > File > chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc > (right): > > ...
6 years, 1 month ago (2014-10-27 15:25:30 UTC) #9
lazyboy
https://codereview.chromium.org/678653003/diff/120001/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc File chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc (right): https://codereview.chromium.org/678653003/diff/120001/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc#newcode186 chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc:186: gfx::Point screen_point(params().x, params().y); On 2014/10/25 18:46:59, lazyboy wrote: > ...
6 years, 1 month ago (2014-10-27 17:50:57 UTC) #10
sky
https://codereview.chromium.org/678653003/diff/180001/content/public/common/context_menu_params.h File content/public/common/context_menu_params.h (right): https://codereview.chromium.org/678653003/diff/180001/content/public/common/context_menu_params.h#newcode66 content/public/common/context_menu_params.h:66: float screen_x; These should be set in content before ...
6 years, 1 month ago (2014-10-27 19:24:53 UTC) #11
lazyboy
https://codereview.chromium.org/678653003/diff/180001/content/public/common/context_menu_params.h File content/public/common/context_menu_params.h (right): https://codereview.chromium.org/678653003/diff/180001/content/public/common/context_menu_params.h#newcode66 content/public/common/context_menu_params.h:66: float screen_x; On 2014/10/27 19:24:53, sky wrote: > These ...
6 years, 1 month ago (2014-10-27 22:01:13 UTC) #12
sky
Ugh. Ok, I suggest going back to what you had before I sent you on ...
6 years, 1 month ago (2014-10-27 23:44:40 UTC) #13
lazyboy
On 2014/10/27 23:44:40, sky wrote: > Ugh. Ok, I suggest going back to what you ...
6 years, 1 month ago (2014-10-27 23:58:38 UTC) #14
sky
LGTM
6 years, 1 month ago (2014-10-28 01:58:15 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678653003/220001
6 years, 1 month ago (2014-10-28 02:32:17 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/20495) linux_chromium_asan_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel/builds/6759) linux_chromium_compile_dbg_32 ...
6 years, 1 month ago (2014-10-28 02:39:37 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678653003/260001
6 years, 1 month ago (2014-10-28 04:07:47 UTC) #21
commit-bot: I haz the power
Committed patchset #14 (id:260001)
6 years, 1 month ago (2014-10-28 04:51:53 UTC) #22
commit-bot: I haz the power
6 years, 1 month ago (2014-10-28 04:52:40 UTC) #23
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/e934d06d39858a9ebfbe2fef35aa16c2084f50e5
Cr-Commit-Position: refs/heads/master@{#301564}

Powered by Google App Engine
This is Rietveld 408576698