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

Issue 2886113002: Introduce WebPluginContainerBase to abstract WebPluginContainerImpl. (Closed)

Created:
3 years, 7 months ago by slangley
Modified:
3 years, 7 months ago
Reviewers:
tkent, haraken, sashab, dcheng
CC:
blink-reviews, chromium-reviews, kinuko+watch, mlamouri+watch-blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce WebPluginContainerBase to abstract WebPluginContainerImpl. Many classes in web/ take a dependancy on WebPluginContainerImpl, in some cases this dependency is cyclic. In order to break this dependency we introduce a new temporary abstraction WebPluginContainerBase, that derives from PlugingView, WebPluginContainer and ContextClient. Classes that were taking a dependency on WebPluginContainerImpl now take a dependency on WebPluginContainerBase. In cases where there we methods that were only defined in WebPluginContainerImpl we make them pure virtual in WebPluginContainerBase and override them in WebPluginContainerImpl. As WebPluginContainerImpl is garbage collected, we move this to WebPluginContainerBase and define a virtual trace method. The intention is for this abstraction to be temporary, once we move all of the dependencies into core/ we can remove it. I put the new class in core/exported as it derives from WebPluginContainer. BUG=712963 Review-Url: https://codereview.chromium.org/2886113002 Cr-Original-Commit-Position: refs/heads/master@{#472810} Committed: https://chromium.googlesource.com/chromium/src/+/303acce5cc18d95d46342bd089e06957841bc21b Review-Url: https://codereview.chromium.org/2886113002 Cr-Commit-Position: refs/heads/master@{#473111} Committed: https://chromium.googlesource.com/chromium/src/+/7f10adc089153731d35a4a04956d7673342db2e4

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix code review comments. #

Patch Set 3 : Introduce a method to perform virtual dispatch of the finalizer Dispose() method. #

Patch Set 4 : Rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -99 lines) Patch
M third_party/WebKit/Source/core/exported/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/exported/WebPluginContainerBase.h View 1 2 1 chunk +78 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/core/exported/WebPluginContainerBase.cpp View 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/ContextMenuClientImpl.cpp View 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebHelperPluginImpl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebHelperPluginImpl.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebInputMethodControllerImpl.cpp View 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.h View 1 2 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 18 chunks +22 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/web/WebNode.cpp View 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebPluginContainerImpl.h View 4 chunks +16 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/web/WebPluginContainerImpl.cpp View 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebPluginDocument.cpp View 2 chunks +4 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp View 19 chunks +22 lines, -22 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 40 (20 generated)
slangley
3 years, 7 months ago (2017-05-17 04:57:42 UTC) #3
slangley
3 years, 7 months ago (2017-05-17 06:39:19 UTC) #5
dcheng
LGTM https://codereview.chromium.org/2886113002/diff/1/third_party/WebKit/Source/core/exported/WebPluginContainerBase.h File third_party/WebKit/Source/core/exported/WebPluginContainerBase.h (right): https://codereview.chromium.org/2886113002/diff/1/third_party/WebKit/Source/core/exported/WebPluginContainerBase.h#newcode72 third_party/WebKit/Source/core/exported/WebPluginContainerBase.h:72: true); Optional nit: newline for consistency =P
3 years, 7 months ago (2017-05-17 07:19:41 UTC) #6
slangley
Thanks! https://codereview.chromium.org/2886113002/diff/1/third_party/WebKit/Source/core/exported/WebPluginContainerBase.h File third_party/WebKit/Source/core/exported/WebPluginContainerBase.h (right): https://codereview.chromium.org/2886113002/diff/1/third_party/WebKit/Source/core/exported/WebPluginContainerBase.h#newcode72 third_party/WebKit/Source/core/exported/WebPluginContainerBase.h:72: true); On 2017/05/17 at 07:19:41, dcheng (in AEST) ...
3 years, 7 months ago (2017-05-17 07:21:37 UTC) #7
tkent
lgtm
3 years, 7 months ago (2017-05-17 07:38:03 UTC) #8
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/2886113002/20001
3 years, 7 months ago (2017-05-18 10:08:41 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/430433)
3 years, 7 months ago (2017-05-18 12:27:42 UTC) #13
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/2886113002/20001
3 years, 7 months ago (2017-05-18 12:38:06 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/303acce5cc18d95d46342bd089e06957841bc21b
3 years, 7 months ago (2017-05-18 15:04:12 UTC) #18
jbroman
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2888283004/ by jbroman@chromium.org. ...
3 years, 7 months ago (2017-05-18 20:19:49 UTC) #19
slangley
Failure was caused because USING_PRE_FINALIZER does not support virtual dispatch. Fix is in place.
3 years, 7 months ago (2017-05-19 00:46:05 UTC) #24
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/2886113002/60001
3 years, 7 months ago (2017-05-19 00:50:00 UTC) #27
dcheng
On 2017/05/19 00:46:05, slangley wrote: > Failure was caused because USING_PRE_FINALIZER does not support virtual ...
3 years, 7 months ago (2017-05-19 02:24:01 UTC) #28
slangley
On 2017/05/19 at 02:24:01, dcheng wrote: > On 2017/05/19 00:46:05, slangley wrote: > > Failure ...
3 years, 7 months ago (2017-05-19 02:38:24 UTC) #29
dcheng
On 2017/05/19 02:38:24, slangley wrote: > On 2017/05/19 at 02:24:01, dcheng wrote: > > On ...
3 years, 7 months ago (2017-05-19 02:44:06 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/449351)
3 years, 7 months ago (2017-05-19 04:06:08 UTC) #33
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/2886113002/60001
3 years, 7 months ago (2017-05-19 04:19:07 UTC) #35
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/7f10adc089153731d35a4a04956d7673342db2e4
3 years, 7 months ago (2017-05-19 06:54:36 UTC) #38
haraken
LGTM with a comment. https://codereview.chromium.org/2886113002/diff/60001/third_party/WebKit/Source/core/exported/WebPluginContainerBase.h File third_party/WebKit/Source/core/exported/WebPluginContainerBase.h (right): https://codereview.chromium.org/2886113002/diff/60001/third_party/WebKit/Source/core/exported/WebPluginContainerBase.h#newcode57 third_party/WebKit/Source/core/exported/WebPluginContainerBase.h:57: void DispatchDispose() { Dispose(); } ...
3 years, 7 months ago (2017-05-19 07:44:15 UTC) #39
dcheng
3 years, 7 months ago (2017-05-19 08:38:23 UTC) #40
Message was sent while issue was closed.
On 2017/05/19 07:44:15, haraken wrote:
> LGTM with a comment.
> 
>
https://codereview.chromium.org/2886113002/diff/60001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/core/exported/WebPluginContainerBase.h (right):
> 
>
https://codereview.chromium.org/2886113002/diff/60001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/exported/WebPluginContainerBase.h:57: void
> DispatchDispose() { Dispose(); }
> 
> This is confusing. Can we do something like:
> 
> - Move USING_PRE_FINALIZER to WebPluginContainerImpl.
> - Make the pre-finalizer call WebPluginContainerImpl::PreFinalize (a
non-virtual
> method).
> - Make WebPluginContainerImpl::PreFinalize call Dispose.
> 
> However, why do we need the pre-finalilzer in the first place? It looks weird
> that there is no explicit timing to dispose the WebPluginContainerImpl.

The pre-finalizer was introduced in
https://chromium.googlesource.com/chromium/src/+/bc3e1557791eb247d7bb820e1f8e....
I think we can reconsider the need for this once joelhockey's work to clean up
the widget tree is done.

Powered by Google App Engine
This is Rietveld 408576698