commit | 328cae2c82cb2e079658944f626883df74ed5c5a | [log] [tgz] |
---|---|---|
author | Dirk Pranke <dpranke@chromium.org> | Tue Feb 19 23:41:50 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Feb 19 23:41:50 2019 |
tree | 458cefd91cee10c95dbf295eeb957bda00448fbe | |
parent | 16fe7d881aaa927dabf9f0d22552a3258c93f9c8 [diff] |
Revert "Add RenderFrameHost as parameter to WebContentsDelegate::HandleContextMenu" This reverts commit 5705b913a577759d16b3eca7d5b0e7b5c79421f6. Reason for revert: Suspect this caused a failure in content_unittests on Android CFI: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Android%20CFI/4518 Original change's description: > Add RenderFrameHost as parameter to WebContentsDelegate::HandleContextMenu > > To be able to do anything more complicated than block all context > menu handling in HandleContextMenu you need the associated WebContents > object. Current implementation that do something more currently handles > that by either being a WebContentsObserver or keeping the WebContents > object some other way. > > After WebContents checks WebContentsDelegate::HandleContextMenu the > next delegate to get a chance is WebContentsViewDelegate::ShowContextMenu > which takes a RenderFrameHost as additional parameter. This is all > you need to get the WebContents object and other related information. > > So, to simplify writing WebContentsDelegate:s and override the > context menu handling by actually showing something, include > RenderFrameHost also in the HandleContextMenu call. > > I selected RenderFrameHost instead of WebContents that many > other delegate methods use because it matches ShowContextMenu > signature and there are already other delegate methods that > also uses RenderFrameHost instead. > > WebContentsDelegate is a very popular interface, so this > modifies a lot of files in different components but the > changes are mechanical. > > Change-Id: I612202730f9a3badd38062e8284f1d50979e9377 > Bug: 932520 > Reviewed-on: https://chromium-review.googlesource.com/c/1472696 > Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> > Reviewed-by: Jochen Eisinger <jochen@chromium.org> > Commit-Queue: Joel Klinghed <the_jk@opera.com> > Cr-Commit-Position: refs/heads/master@{#633300} TBR=ellyjones@chromium.org,the_jk@opera.com,jochen@chromium.org Change-Id: I2c23108bebf04fb9248ad799f6e8e3917a93536b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 932520 Reviewed-on: https://chromium-review.googlesource.com/c/1478184 Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Dirk Pranke <dpranke@chromium.org> Cr-Commit-Position: refs/heads/master@{#633454}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .