summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/ActiveTabsPage.java
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-10-07 18:00:23 -0700
committerGrace Kloba <klobag@google.com>2009-10-09 14:17:09 -0700
commit22ac16eab0b62d24a99fc360f2ccea14837f4127 (patch)
tree1a982f998ae6acac172b269c4d0daf215afa3530 /src/com/android/browser/ActiveTabsPage.java
parent986174aacfe289956975d731b87a7f99a19ce0b0 (diff)
downloadpackages_apps_Browser-22ac16eab0b62d24a99fc360f2ccea14837f4127.zip
packages_apps_Browser-22ac16eab0b62d24a99fc360f2ccea14837f4127.tar.gz
packages_apps_Browser-22ac16eab0b62d24a99fc360f2ccea14837f4127.tar.bz2
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
Diffstat (limited to 'src/com/android/browser/ActiveTabsPage.java')
-rw-r--r--src/com/android/browser/ActiveTabsPage.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/browser/ActiveTabsPage.java b/src/com/android/browser/ActiveTabsPage.java
index 90c417a..72f291c 100644
--- a/src/com/android/browser/ActiveTabsPage.java
+++ b/src/com/android/browser/ActiveTabsPage.java
@@ -49,7 +49,7 @@ public class ActiveTabsPage extends LinearLayout {
mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
- if (mControl.getTabCount() < TabControl.MAX_TABS) {
+ if (mControl.canCreateNewTab()) {
position--;
}
boolean needToAttach = false;
@@ -92,7 +92,7 @@ public class ActiveTabsPage extends LinearLayout {
private class TabsListAdapter extends BaseAdapter {
public int getCount() {
int count = mControl.getTabCount();
- if (count < TabControl.MAX_TABS) {
+ if (mControl.canCreateNewTab()) {
count++;
}
return count;
@@ -107,7 +107,7 @@ public class ActiveTabsPage extends LinearLayout {
return 2;
}
public int getItemViewType(int position) {
- if (mControl.getTabCount() < TabControl.MAX_TABS) {
+ if (mControl.canCreateNewTab()) {
position--;
}
// Do not recycle the "add new tab" item.
@@ -115,7 +115,7 @@ public class ActiveTabsPage extends LinearLayout {
}
public View getView(int position, View convertView, ViewGroup parent) {
final int tabCount = mControl.getTabCount();
- if (tabCount < TabControl.MAX_TABS) {
+ if (mControl.canCreateNewTab()) {
position--;
}
@@ -131,8 +131,8 @@ public class ActiveTabsPage extends LinearLayout {
ImageView favicon =
(ImageView) convertView.findViewById(R.id.favicon);
View close = convertView.findViewById(R.id.close);
- TabControl.Tab tab = mControl.getTab(position);
- mControl.populatePickerData(tab);
+ Tab tab = mControl.getTab(position);
+ tab.populatePickerData();
title.setText(tab.getTitle());
url.setText(tab.getUrl());
Bitmap icon = tab.getFavicon();