Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / android / java / src / org / chromium / chrome / browser / infobar / InfoBarContainer.java
index 6247888..a378301 100644 (file)
@@ -18,9 +18,9 @@ import com.google.common.annotations.VisibleForTesting;
 
 import org.chromium.base.ApiCompatibilityUtils;
 import org.chromium.base.CalledByNative;
-import org.chromium.content.browser.DeviceUtils;
 import org.chromium.content_public.browser.WebContents;
 import org.chromium.ui.UiUtils;
+import org.chromium.ui.base.DeviceFormFactor;
 
 import java.util.ArrayDeque;
 import java.util.ArrayList;
@@ -38,6 +38,9 @@ public class InfoBarContainer extends LinearLayout {
     private static final String TAG = "InfoBarContainer";
     private static final long REATTACH_FADE_IN_MS = 250;
 
+    /**
+     * A listener for the InfoBar animation.
+     */
     public interface InfoBarAnimationListener {
         /**
          * Notifies the subscriber when an animation is completed.
@@ -112,7 +115,7 @@ public class InfoBarContainer extends LinearLayout {
         mAnimationSizer.setVisibility(INVISIBLE);
 
         // The tablet has the infobars below the location bar. On the phone they are at the bottom.
-        mInfoBarsOnTop = DeviceUtils.isTablet(activity);
+        mInfoBarsOnTop = DeviceFormFactor.isTablet(activity);
         setGravity(determineGravity());
 
         // Chromium's InfoBarContainer may add an InfoBar immediately during this initialization
@@ -210,15 +213,6 @@ public class InfoBarContainer extends LinearLayout {
         setVisibility(INVISIBLE);
     }
 
-    public InfoBar findInfoBar(int nativeInfoBar) {
-        for (InfoBar infoBar : mInfoBars) {
-            if (infoBar.ownsNativeInfoBar(nativeInfoBar)) {
-                return infoBar;
-            }
-        }
-        return null;
-    }
-
     /**
      * Adds an InfoBar to the view hierarchy.
      * @param infoBar InfoBar to add to the View hierarchy.