DescriptionMove BrowserPluginDelegate's lifetime mgmt out of content/
This CL makes BrowserPlugin not own BPDelegate (GuestViewContainer)
anymore.
BrowserPluginDelegate's lifetime has been tied to garbage collection
of the shadow root HTML element that contains the plugin. For
example, for <webview>, this is the <webview> element.
Before registering BPDelegate to GC, there's a brief period while
BPDelegate is not owned by anyone directly, this case is covered
with the static PostTask that deletes the delegate if we did not
tie it to GC (UpdateInternalInstanceIdAndBindDelegateToGC()).
To make <webview> run without BrowserPlugin, we need to manage
GuestViewContainer's (which is a BPDelegate) lifetime out of
content/.
BUG=330264
Test=None, internal change only.
Committed: https://crrev.com/cb6ba5c2ad69bf9daf896e5d3cd0c252c0ce6da3
Cr-Commit-Position: refs/heads/master@{#333552}
Patch Set 1 #Patch Set 2 : for trybot run #Patch Set 3 : Clean up for review. #
Total comments: 9
Patch Set 4 : make dtor protected #
Total comments: 16
Patch Set 5 : upload correct patch this time #
Total comments: 16
Patch Set 6 : pass one #Patch Set 7 : pass two #Patch Set 8 : . #
Total comments: 4
Patch Set 9 : address nits #Patch Set 10 : Sync @tott #Messages
Total messages: 19 (4 generated)
|