Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java

Issue 1438583003: Revert of Add 200MS delay before starting toolbar scale animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/android/java/src/org/chromium/base/ThreadUtils.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
index 95294ade2771242885addfa4198a1a94a6dda505..df87a09926dabf3895d2d38413d570e6cbe6a871 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
@@ -22,7 +22,6 @@
import android.widget.TextView;
import org.chromium.base.ApiCompatibilityUtils;
-import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.WebsiteSettingsPopup;
@@ -51,8 +50,6 @@
*/
public class CustomTabToolbar extends ToolbarLayout implements LocationBar,
View.OnLongClickListener {
- private static final int TITLE_ANIM_DELAY_MS = 200;
-
private View mLocationBarFrameLayout;
private View mTitleUrlContainer;
private UrlBar mUrlBar;
@@ -68,14 +65,6 @@
private CustomTabToolbarAnimationDelegate mAnimDelegate;
private boolean mBackgroundColorSet;
- private long mInitializeTimeStamp;
-
- private Runnable mTitleAnimationStarter = new Runnable() {
- @Override
- public void run() {
- mAnimDelegate.startTitleAnimation(getContext());
- }
- };
/**
* Constructor for getting this class inflated from an xml layout file.
@@ -116,7 +105,6 @@
ToolbarTabController tabController, AppMenuButtonHelper appMenuButtonHelper) {
super.initialize(toolbarDataProvider, tabController, appMenuButtonHelper);
updateVisualsForState();
- mInitializeTimeStamp = System.currentTimeMillis();
}
@Override
@@ -215,13 +203,7 @@
// It takes some time to parse the title of the webcontent, and before that Tab#getTitle
// always return the url. We postpone the title animation until the title is authentic.
if (mShouldShowTitle && !TextUtils.equals(currentTab.getTitle(), currentTab.getUrl())) {
- long duration = System.currentTimeMillis() - mInitializeTimeStamp;
- if (duration >= TITLE_ANIM_DELAY_MS) {
- mTitleAnimationStarter.run();
- } else {
- ThreadUtils.postOnUiThreadDelayed(mTitleAnimationStarter,
- TITLE_ANIM_DELAY_MS - duration);
- }
+ mAnimDelegate.startTitleAnimation(getContext());
}
mTitleBar.setText(currentTab.getTitle());
« no previous file with comments | « base/android/java/src/org/chromium/base/ThreadUtils.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698