[WebLayer] Reuse //components-level SwipableOverlayView
//chrome's SwipableOverlayView.java has now been componentized, and hence //weblayer can reuse it rather than having its own custom copy. The only change made to this code in //weblayer was to support the fact that //weblayer needs to add the SwipableOverlayView to its parent at a specific index. This CL adds that API to the //components-level SwipableOverlayView.java and eliminates //weblayer's copy in favor of its using the //components-level class. Note: I didn't have the existing SwipableOverlayView#addToParentView() call through to the newly-added SwipableOverlayView#addToParentViewAtIndex() because the default value used for the index in the ViewGroup#addView() variant that doesn't take in an index doesn't seem to be documented publicly anywhere. In practice it looks like -1 from looking at the ViewGroup.java source, but I don't want to hardcode that without public documentation. Bug: 1099169 Change-Id: If159701d611b7eee1a600911ff0b2aa1bda10154 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274390 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by:Dominick Ng <dominickn@chromium.org> Cr-Commit-Position: refs/heads/master@{#784351}
Showing
This diff is collapsed.
Please register or sign in to comment