| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser.infobar; | 5 package org.chromium.chrome.browser.infobar; |
| 6 | 6 |
| 7 import android.animation.ObjectAnimator; | 7 import android.animation.ObjectAnimator; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.graphics.Canvas; | 9 import android.graphics.Canvas; |
| 10 import android.view.Gravity; | 10 import android.view.Gravity; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // We only animate changing infobars one at a time. | 82 // We only animate changing infobars one at a time. |
| 83 private final ArrayDeque<InfoBarTransitionInfo> mInfoBarTransitions; | 83 private final ArrayDeque<InfoBarTransitionInfo> mInfoBarTransitions; |
| 84 | 84 |
| 85 // Animation currently moving InfoBars around. | 85 // Animation currently moving InfoBars around. |
| 86 private AnimationHelper mAnimation; | 86 private AnimationHelper mAnimation; |
| 87 private final FrameLayout mAnimationSizer; | 87 private final FrameLayout mAnimationSizer; |
| 88 | 88 |
| 89 // True when this container has been emptied and its native counterpart has
been destroyed. | 89 // True when this container has been emptied and its native counterpart has
been destroyed. |
| 90 private boolean mDestroyed = false; | 90 private boolean mDestroyed = false; |
| 91 | 91 |
| 92 // The id of the tab associated with us. Set to TabBase.INVALID_TAB_ID if no
tab is associated. | 92 // The id of the tab associated with us. Set to Tab.INVALID_TAB_ID if no tab
is associated. |
| 93 private int mTabId; | 93 private int mTabId; |
| 94 | 94 |
| 95 // Parent view that contains us. | 95 // Parent view that contains us. |
| 96 private ViewGroup mParentView; | 96 private ViewGroup mParentView; |
| 97 | 97 |
| 98 public InfoBarContainer(Activity activity, AutoLoginProcessor autoLoginProce
ssor, | 98 public InfoBarContainer(Activity activity, AutoLoginProcessor autoLoginProce
ssor, |
| 99 int tabId, ViewGroup parentView, long nativeWebContents) { | 99 int tabId, ViewGroup parentView, long nativeWebContents) { |
| 100 super(activity); | 100 super(activity); |
| 101 setOrientation(LinearLayout.VERTICAL); | 101 setOrientation(LinearLayout.VERTICAL); |
| 102 mAnimationListener = null; | 102 mAnimationListener = null; |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 } | 511 } |
| 512 | 512 |
| 513 public long getNative() { | 513 public long getNative() { |
| 514 return mNativeInfoBarContainer; | 514 return mNativeInfoBarContainer; |
| 515 } | 515 } |
| 516 | 516 |
| 517 private native long nativeInit(long webContentsPtr, AutoLoginDelegate autoLo
ginDelegate); | 517 private native long nativeInit(long webContentsPtr, AutoLoginDelegate autoLo
ginDelegate); |
| 518 | 518 |
| 519 private native void nativeDestroy(long nativeInfoBarContainerAndroid); | 519 private native void nativeDestroy(long nativeInfoBarContainerAndroid); |
| 520 } | 520 } |
| OLD | NEW |