diff options
Diffstat (limited to 'ui/android')
-rw-r--r-- | ui/android/java/src/org/chromium/ui/ViewAndroidDelegate.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/ui/android/java/src/org/chromium/ui/ViewAndroidDelegate.java b/ui/android/java/src/org/chromium/ui/ViewAndroidDelegate.java index c6855a1..531dce8 100644 --- a/ui/android/java/src/org/chromium/ui/ViewAndroidDelegate.java +++ b/ui/android/java/src/org/chromium/ui/ViewAndroidDelegate.java @@ -7,25 +7,28 @@ package org.chromium.ui; import android.view.View; /** - * Interface to add and remove views from the implementing view. + * Interface to acquire and release anchor views from the implementing View. */ public interface ViewAndroidDelegate { /** - * Add the view. - * @param view The view to be added. + * @return An anchor view that can be used to anchor decoration views like Autofill popup. */ - void addViewToContainerView(View view); + View acquireAnchorView(); /** - * Remove the view if it is present, otherwise do nothing. - * @param view The view to be removed. + * Set the anchor view to specified position and width (all units in dp). + * @param view The anchor view that needs to be positioned. + * @param x X coordinate of the top left corner of the anchor view. + * @param y Y coordinate of the top left corner of the anchor view. + * @param width The width of the anchor view. + * @param height The height of the anchor view. */ - void removeViewFromContainerView(View view); + void setAnchorViewPosition(View view, float x, float y, float width, float height); /** - * Used for any calculations that need to place a View near a particular piece of web content. - * @return The Y offset in pixels to apply to any added views. + * Release given anchor view. + * @param anchorView The anchor view that needs to be released. */ - int getChildViewOffsetYPix(); + void releaseAnchorView(View anchorView); }
\ No newline at end of file |