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.compositor.overlays.strip; | 5 package org.chromium.chrome.browser.compositor.overlays.strip; |
6 | 6 |
7 import static org.chromium.chrome.browser.compositor.layouts.ChromeAnimation.Ani
matableAnimation.createAnimation; | 7 import static org.chromium.chrome.browser.compositor.layouts.ChromeAnimation.Ani
matableAnimation.createAnimation; |
8 | 8 |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.graphics.RectF; | 10 import android.graphics.RectF; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 // Close button width | 60 // Close button width |
61 private static final int CLOSE_BUTTON_WIDTH_DP = 36; | 61 private static final int CLOSE_BUTTON_WIDTH_DP = 36; |
62 | 62 |
63 private int mId = Tab.INVALID_TAB_ID; | 63 private int mId = Tab.INVALID_TAB_ID; |
64 | 64 |
65 private final TabLoadTracker mLoadTracker; | 65 private final TabLoadTracker mLoadTracker; |
66 private final LayoutRenderHost mRenderHost; | 66 private final LayoutRenderHost mRenderHost; |
67 | 67 |
68 private boolean mVisible = true; | 68 private boolean mVisible = true; |
69 private boolean mIsDying = false; | 69 private boolean mIsDying; |
70 private boolean mCanShowCloseButton = true; | 70 private boolean mCanShowCloseButton = true; |
71 private final boolean mIncognito; | 71 private final boolean mIncognito; |
72 private float mContentOffsetX; | 72 private float mContentOffsetX; |
73 private float mVisiblePercentage = 1.f; | 73 private float mVisiblePercentage = 1.f; |
74 private String mAccessibilityDescription; | 74 private String mAccessibilityDescription; |
75 | 75 |
76 // Ideal intermediate parameters | 76 // Ideal intermediate parameters |
77 private float mIdealX; | 77 private float mIdealX; |
78 private float mTabOffsetX; | 78 private float mTabOffsetX; |
79 private float mTabOffsetY; | 79 private float mTabOffsetY; |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 if (!mShowingCloseButton) mCloseButton.setPressed(false); | 586 if (!mShowingCloseButton) mCloseButton.setPressed(false); |
587 } | 587 } |
588 } | 588 } |
589 | 589 |
590 private Animation<Animatable<?>> buildCloseButtonOpacityAnimation(float fina
lOpacity) { | 590 private Animation<Animatable<?>> buildCloseButtonOpacityAnimation(float fina
lOpacity) { |
591 return createAnimation(mCloseButton, CompositorButton.Property.OPACITY, | 591 return createAnimation(mCloseButton, CompositorButton.Property.OPACITY, |
592 mCloseButton.getOpacity(), finalOpacity, ANIM_TAB_CLOSE_BUTTON_F
ADE_MS, 0, false, | 592 mCloseButton.getOpacity(), finalOpacity, ANIM_TAB_CLOSE_BUTTON_F
ADE_MS, 0, false, |
593 ChromeAnimation.getLinearInterpolator()); | 593 ChromeAnimation.getLinearInterpolator()); |
594 } | 594 } |
595 } | 595 } |
OLD | NEW |