Move Tab out of TabControl to its own class. So that
each tab has its own WebViewClient, WebChromeClient,
ErrorConsoleView, lock icon type and inLoad (matching
mPageStarted) state.
Clean up BrowserActivity, TabControl, create a new Tab class.
Fix stopAllLoading() to stop all main window and sub window loading.
Remove mScale/mScrollX/Y from PickerData as it is not used any more.
Remove doFlick/SensorManager as it is not used any more.
Remove whiteList as it is not used any more.
Remove MASF proxy service as it is not used any more.
With this change,
we will take the snapshot even when it is in the background.
we will update the touchicon url even when it is in the background.
we will update the bookmark/history even when it is in the background.
we will update database quota and max appCache size even when it is in the background.
we will show the error dialog of the background tab when it is brought to the foreground. (New behavior)
we will update the lock icon correctly when switching tabs.
we will proceed the http auth request for the background tab if we already have username and password.
Fix http://b/issue?id=2158621
diff --git a/src/com/android/browser/DownloadTouchIcon.java b/src/com/android/browser/DownloadTouchIcon.java
index 07d2d3a..1761dd4 100644
--- a/src/com/android/browser/DownloadTouchIcon.java
+++ b/src/com/android/browser/DownloadTouchIcon.java
@@ -42,11 +42,10 @@
private final String mOriginalUrl;
private final String mUrl;
private final String mUserAgent;
- /* package */ BrowserActivity mActivity;
+ /* package */ Tab mTab;
- public DownloadTouchIcon(BrowserActivity activity, ContentResolver cr,
- Cursor c, WebView view) {
- mActivity = activity;
+ public DownloadTouchIcon(Tab tab, ContentResolver cr, Cursor c, WebView view) {
+ mTab = tab;
mContentResolver = cr;
mCursor = c;
// Store these in case they change.
@@ -56,7 +55,7 @@
}
public DownloadTouchIcon(ContentResolver cr, Cursor c, String url) {
- mActivity = null;
+ mTab = null;
mContentResolver = cr;
mCursor = c;
mOriginalUrl = null;
@@ -109,9 +108,9 @@
@Override
public void onPostExecute(Bitmap icon) {
// Do this first in case the download failed.
- if (mActivity != null) {
+ if (mTab != null) {
// Remove the touch icon loader from the BrowserActivity.
- mActivity.mTouchIconLoader = null;
+ mTab.mTouchIconLoader = null;
}
if (icon == null || mCursor == null || isCancelled()) {