OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.toolbar; | 5 package org.chromium.chrome.browser.toolbar; |
6 | 6 |
7 import android.animation.Animator; | 7 import android.animation.Animator; |
8 import android.animation.AnimatorListenerAdapter; | 8 import android.animation.AnimatorListenerAdapter; |
9 import android.animation.AnimatorSet; | 9 import android.animation.AnimatorSet; |
10 import android.animation.ObjectAnimator; | 10 import android.animation.ObjectAnimator; |
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1750 | 1750 |
1751 TransitionDrawable shadowDrawable = (TransitionDrawable) mToolbarShadow.
getDrawable(); | 1751 TransitionDrawable shadowDrawable = (TransitionDrawable) mToolbarShadow.
getDrawable(); |
1752 if (hasFocus) { | 1752 if (hasFocus) { |
1753 dismissTabSwitcherCallout(); | 1753 dismissTabSwitcherCallout(); |
1754 shadowDrawable.startTransition(URL_FOCUS_CHANGE_ANIMATION_DURATION_M
S); | 1754 shadowDrawable.startTransition(URL_FOCUS_CHANGE_ANIMATION_DURATION_M
S); |
1755 } else { | 1755 } else { |
1756 shadowDrawable.reverseTransition(URL_FOCUS_CHANGE_ANIMATION_DURATION
_MS); | 1756 shadowDrawable.reverseTransition(URL_FOCUS_CHANGE_ANIMATION_DURATION
_MS); |
1757 } | 1757 } |
1758 } | 1758 } |
1759 | 1759 |
1760 private void triggerUrlFocusAnimation(final boolean hasFocus) { | 1760 protected void triggerUrlFocusAnimation(final boolean hasFocus) { |
1761 if (mUrlFocusLayoutAnimator != null && mUrlFocusLayoutAnimator.isRunning
()) { | 1761 if (mUrlFocusLayoutAnimator != null && mUrlFocusLayoutAnimator.isRunning
()) { |
1762 mUrlFocusLayoutAnimator.cancel(); | 1762 mUrlFocusLayoutAnimator.cancel(); |
1763 mUrlFocusLayoutAnimator = null; | 1763 mUrlFocusLayoutAnimator = null; |
1764 } | 1764 } |
1765 | 1765 |
1766 List<Animator> animators = new ArrayList<>(); | 1766 List<Animator> animators = new ArrayList<>(); |
1767 if (hasFocus) { | 1767 if (hasFocus) { |
1768 populateUrlFocusingAnimatorSet(animators); | 1768 populateUrlFocusingAnimatorSet(animators); |
1769 } else { | 1769 } else { |
1770 populateUrlClearFocusingAnimatorSet(animators); | 1770 populateUrlClearFocusingAnimatorSet(animators); |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 }); | 2238 }); |
2239 | 2239 |
2240 if (mControlsVisibilityDelegate != null) { | 2240 if (mControlsVisibilityDelegate != null) { |
2241 mFullscreenCalloutToken = | 2241 mFullscreenCalloutToken = |
2242 mControlsVisibilityDelegate.showControlsPersistentAndClearOl
dToken( | 2242 mControlsVisibilityDelegate.showControlsPersistentAndClearOl
dToken( |
2243 mFullscreenCalloutToken); | 2243 mFullscreenCalloutToken); |
2244 } | 2244 } |
2245 } | 2245 } |
2246 } | 2246 } |
2247 | 2247 |
OLD | NEW |