From d122cfbfac5f51d322042d2d5d531b51e07f3d2b Mon Sep 17 00:00:00 2001 From: "aurimas@chromium.org" Date: Thu, 2 May 2013 22:02:34 +0000 Subject: [Android] Add AutofillPopup to AutofillDialog. Add AutofillPopup support to AutofillDialog. The same AutofillPopup code is now used for web pages and AutofillDialog. BUG=222743 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/14253011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197979 0039d316-1c4b-4281-b951-d872f2087c98 --- .../src/org/chromium/ui/ViewAndroidDelegate.java | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'ui/android') 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 -- cgit v1.1