diff options
author | John Reck <jreck@google.com> | 2011-07-12 16:42:08 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-07-13 10:26:27 -0700 |
commit | ef654f1dd80f55609060005342fc4f2cde62990c (patch) | |
tree | 99bac9d568efd8972a703e26b2a35c6fb047d882 /src/com/android/browser/BaseUi.java | |
parent | 9ef259af433edc5aeb11b5d5d94dc9acc697c61e (diff) | |
download | packages_apps_browser-ef654f1dd80f55609060005342fc4f2cde62990c.zip packages_apps_browser-ef654f1dd80f55609060005342fc4f2cde62990c.tar.gz packages_apps_browser-ef654f1dd80f55609060005342fc4f2cde62990c.tar.bz2 |
Snapshot title bar
Bug: 4982126
Change-Id: I67931d39e3a3ce535b38197ebeee1651241d1a60
Diffstat (limited to 'src/com/android/browser/BaseUi.java')
-rw-r--r-- | src/com/android/browser/BaseUi.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java index 5551eca..858e13e 100644 --- a/src/com/android/browser/BaseUi.java +++ b/src/com/android/browser/BaseUi.java @@ -74,7 +74,7 @@ public abstract class BaseUi implements UI, OnTouchListener { Gravity.CENTER); private static final int MSG_HIDE_TITLEBAR = 1; - private static final int HIDE_TITLEBAR_DELAY = 1500; // in ms + public static final int HIDE_TITLEBAR_DELAY = 1500; // in ms Activity mActivity; UiController mUiController; @@ -208,6 +208,7 @@ public abstract class BaseUi implements UI, OnTouchListener { setFavicon(tab); updateLockIconToLatest(tab); updateNavigationState(tab); + mTitleBar.onTabDataChanged(tab); } @Override @@ -431,7 +432,9 @@ public abstract class BaseUi implements UI, OnTouchListener { mUiController.endActionMode(); } showTitleBar(); - mNavigationBar.startEditingUrl(clearInput); + if (!getActiveTab().isSnapshot()) { + mNavigationBar.startEditingUrl(clearInput); + } } boolean canShowTitleBar() { @@ -443,6 +446,7 @@ public abstract class BaseUi implements UI, OnTouchListener { } protected void showTitleBar() { + mHandler.removeMessages(MSG_HIDE_TITLEBAR); if (canShowTitleBar()) { mTitleBar.show(); } @@ -830,13 +834,12 @@ public abstract class BaseUi implements UI, OnTouchListener { * as if the user is editing the URL bar or if the page is loading */ public void suggestHideTitleBar() { - if (!isLoading() && !isEditingUrl() && !mTitleBar.inAutoLogin()) { + if (!isLoading() && !isEditingUrl() && !mTitleBar.wantsToBeVisible()) { hideTitleBar(); } } protected void showTitleBarForDuration() { - mHandler.removeMessages(MSG_HIDE_TITLEBAR); showTitleBar(); Message msg = Message.obtain(mHandler, MSG_HIDE_TITLEBAR); mHandler.sendMessageDelayed(msg, HIDE_TITLEBAR_DELAY); @@ -854,7 +857,6 @@ public abstract class BaseUi implements UI, OnTouchListener { && !isTitleBarShowing() && web.getVisibleTitleHeight() == 0 && event.getY() > (mInitialY + mTitlebarScrollTriggerSlop)) { - mHandler.removeMessages(MSG_HIDE_TITLEBAR); showTitleBar(); } else if (event.getY() < mInitialY) { mInitialY = event.getY(); |