diff options
author | Michael Kolb <kolby@google.com> | 2011-10-05 13:31:40 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-10-05 16:54:10 -0700 |
commit | a53c98902be0f9f959b6af06227254e5ad2130c9 (patch) | |
tree | 0de53e2024d54d83c42409b5a6f4fcce0401591f /src/com/android | |
parent | bfa8fb8206f64589cbff1bcbfa9bddb3a843d3bd (diff) | |
download | packages_apps_browser-a53c98902be0f9f959b6af06227254e5ad2130c9.zip packages_apps_browser-a53c98902be0f9f959b6af06227254e5ad2130c9.tar.gz packages_apps_browser-a53c98902be0f9f959b6af06227254e5ad2130c9.tar.bz2 |
Immediately update title bar when loading a URL
Bug: 5153437
Change-Id: I712c62f15bcb294a0833f526fa27dac88ec15c8e
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/BaseUi.java | 1 | ||||
-rw-r--r-- | src/com/android/browser/Controller.java | 1 | ||||
-rw-r--r-- | src/com/android/browser/Tab.java | 5 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java index f93edde..3128934 100644 --- a/src/com/android/browser/BaseUi.java +++ b/src/com/android/browser/BaseUi.java @@ -203,6 +203,7 @@ public abstract class BaseUi implements UI { updateNavigationState(tab); mTitleBar.onTabDataChanged(tab); mNavigationBar.onTabDataChanged(tab); + onProgressChanged(tab); } @Override diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 602df06..d9ad75c 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -2358,6 +2358,7 @@ public class Controller if (tab != null) { dismissSubWindow(tab); tab.loadUrl(url, headers); + mUi.onProgressChanged(tab); } } diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index ae52943..ac008f7 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -103,6 +103,7 @@ class Tab implements PictureListener { private static final int MSG_CAPTURE = 42; private static final int CAPTURE_DELAY = 100; + private static final int INITIAL_PROGRESS = 5; private static Bitmap sDefaultFavicon; @@ -563,7 +564,7 @@ class Tab implements PictureListener { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { mInPageLoad = true; - mPageLoadProgress = 0; + mPageLoadProgress = INITIAL_PROGRESS; mCurrentState = new PageState(mContext, view.isPrivateBrowsingEnabled(), url, favicon); mLoadStartTime = SystemClock.uptimeMillis(); @@ -2054,6 +2055,8 @@ class Tab implements PictureListener { public void loadUrl(String url, Map<String, String> headers) { if (mMainView != null) { + mPageLoadProgress = INITIAL_PROGRESS; + mInPageLoad = true; mCurrentState = new PageState(mContext, false, url, null); mWebViewController.onPageStarted(this, mMainView, null); mMainView.loadUrl(url, headers); |