Adds a reference to web contents/container view in Tab class
This is a preparatory CL for upcoming changes that will remove API getWebContents/getContainerView from ContentViewCore. Tab defines direct references to WebContents and container view. WebContents is passed to |initialize| and ContentView is created as the container view in |createContentViewCore|, so it doesn't need to access them indirectly through CVC. They are set in |setContentViewCore| and nulled out in |destroyContentViewCore| to keep their validity in sync. Accompanying changes for cleanup: - Deleted |getActiveContentViewCore|. Other method of similar name |getContentViewCore| returns null if Tab is showing native view or rendered content is already destroyed. So using it instead is enough for all the callsites that already have null checks or tests that know all the preconditions. - |getContentView| always returns container view for non-native page. In fact it is what it was already doing - just made it clearer by removing some dead code in it. Its return type is ViewGroup, and will be used as a replacement for CVC.getContainerView() in other classes. Bug: 598880 Change-Id: I0c5966b69f6871ce53aa5ffadb73a76214ad35b2 Reviewed-on: https://chromium-review.googlesource.com/1018561Reviewed-by:Yash Malik <ymalik@chromium.org> Reviewed-by:
Maria Khomenko <mariakhomenko@chromium.org> Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org> Cr-Commit-Position: refs/heads/master@{#552206}
Showing
This diff is collapsed.
Please register or sign in to comment