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

Issue 2890143003: Move ContextMenu show/hide state tracking to WebContents (Closed)

Created:
3 years, 7 months ago by EhsanK
Modified:
3 years, 6 months ago
CC:
chromium-reviews, creis+watch_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, James Su
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move ContextMenu show/hide state tracking to WebContents Currently, RenderWidgetHostView of the page tracks the visibility state of context menus. However, the RWHV might go away during navigations (cross origin). On the other hand, a context menu might outlive the RWHV and stay visible during the page navigation which leads to a mismatch between the stored visibility state in the new RWHV and the actual visibility of the context menu. This CL will move this state tracking logic to WebContents which stays the same during page navigations. BUG=708182 Review-Url: https://codereview.chromium.org/2890143003 Cr-Commit-Position: refs/heads/master@{#477346} Committed: https://chromium.googlesource.com/chromium/src/+/f6750aae23ef4c4fd8e500f092bff269ca277abc

Patch Set 1 #

Patch Set 2 : One more change in mm file #

Patch Set 3 : Add override #

Patch Set 4 : Fixed a compile error on Mac #

Patch Set 5 : Fix a compile error #

Patch Set 6 : Rebased #

Patch Set 7 : Fixing another compile error #

Total comments: 6

Patch Set 8 : Rebased #

Patch Set 9 : Addressing kenrb@'s comments #

Total comments: 2

Patch Set 10 : Remove #if def #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -36 lines) Patch
M chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm View 1 1 chunk +1 line, -2 lines 0 comments Download
M components/renderer_context_menu/render_view_context_menu_base.cc View 2 chunks +2 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_event_handler.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +21 lines, -1 line 0 comments Download
M content/public/browser/render_widget_host_view.h View 1 chunk +0 lines, -6 lines 0 comments Download
M content/public/browser/web_contents.h View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (41 generated)
EhsanK
Hello Ken. Could you please take a look? I think this is about what it ...
3 years, 7 months ago (2017-05-24 16:02:11 UTC) #24
kenrb
lgtm with nits. It seems reasonable to move that bit of state to the WebContents. ...
3 years, 6 months ago (2017-06-05 17:39:16 UTC) #25
EhsanK
Thanks Ken! Adding creis@ for content/ changes. Charlie, PTAL. https://codereview.chromium.org/2890143003/diff/120001/content/browser/renderer_host/render_widget_host_view_base.h File content/browser/renderer_host/render_widget_host_view_base.h (right): https://codereview.chromium.org/2890143003/diff/120001/content/browser/renderer_host/render_widget_host_view_base.h#newcode397 content/browser/renderer_host/render_widget_host_view_base.h:397: ...
3 years, 6 months ago (2017-06-06 12:34:47 UTC) #32
EhsanK
avi@chromium.org: Please review changes in chrome/ components/ content/. Thanks!
3 years, 6 months ago (2017-06-06 12:36:34 UTC) #34
Avi (use Gerrit)
I do like the bit living on WebContents. https://codereview.chromium.org/2890143003/diff/170014/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/2890143003/diff/170014/content/browser/web_contents/web_contents_impl.cc#newcode4528 content/browser/web_contents/web_contents_impl.cc:4528: showing); ...
3 years, 6 months ago (2017-06-06 14:18:31 UTC) #35
EhsanK
Thanks Avi! PTAL. https://codereview.chromium.org/2890143003/diff/170014/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/2890143003/diff/170014/content/browser/web_contents/web_contents_impl.cc#newcode4528 content/browser/web_contents/web_contents_impl.cc:4528: showing); On 2017/06/06 14:18:30, Avi (ping ...
3 years, 6 months ago (2017-06-06 16:17:38 UTC) #40
Avi (use Gerrit)
On 2017/06/06 16:17:38, EhsanK wrote: > Thanks Avi! PTAL. > > https://codereview.chromium.org/2890143003/diff/170014/content/browser/web_contents/web_contents_impl.cc > File content/browser/web_contents/web_contents_impl.cc ...
3 years, 6 months ago (2017-06-06 16:21:14 UTC) #41
EhsanK
Thanks Avi! I will try to CQ soon.
3 years, 6 months ago (2017-06-06 18:24:07 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2890143003/190001
3 years, 6 months ago (2017-06-06 18:25:04 UTC) #48
commit-bot: I haz the power
3 years, 6 months ago (2017-06-06 18:30:00 UTC) #51
Message was sent while issue was closed.
Committed patchset #10 (id:190001) as
https://chromium.googlesource.com/chromium/src/+/f6750aae23ef4c4fd8e500f092bf...

Powered by Google App Engine
This is Rietveld 408576698