diff options
-rw-r--r-- | src/com/android/browser/Tab.java | 2 | ||||
-rw-r--r-- | src/com/android/browser/TabBar.java | 11 | ||||
-rw-r--r-- | src/com/android/browser/TabControl.java | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index 36566c1..910f753 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -510,7 +510,7 @@ class Tab { mActivity.onPageStarted(view, url, favicon); } if (getTabChangeListener() != null) { - getTabChangeListener().onPageStarted(Tab.this); + getTabChangeListener().onPageStarted(Tab.this, favicon); } } diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java index b2c687d..9d58675 100644 --- a/src/com/android/browser/TabBar.java +++ b/src/com/android/browser/TabBar.java @@ -68,6 +68,8 @@ public class TabBar extends LinearLayout private boolean mTitleVisible; private boolean mShowUrlMode; + private Drawable mGenericFavicon; + public TabBar(BrowserActivity context, TabControl tabcontrol, TitleBarXLarge titlebar) { super(context); Resources res = context.getResources(); @@ -86,6 +88,7 @@ public class TabBar extends LinearLayout mTabs = (TabScrollView) findViewById(R.id.tabs); mNewTab = (ImageButton) findViewById(R.id.newtab); mNewTab.setOnClickListener(this); + mGenericFavicon = res.getDrawable(R.drawable.app_web_browser_sm); // TODO: Change enabled states based on whether you can go // back/forward. Probably should be done inside onPageStarted. @@ -365,7 +368,7 @@ public class TabBar extends LinearLayout array[0] = new PaintDrawable(Color.BLACK); array[1] = new PaintDrawable(Color.WHITE); if (icon == null) { -// array[2] = mGenericFavicon; + array[2] = mGenericFavicon; } else { array[2] = new BitmapDrawable(icon); } @@ -441,7 +444,11 @@ public class TabBar extends LinearLayout } @Override - public void onPageStarted(Tab tab) { + public void onPageStarted(Tab tab, Bitmap favicon) { + TabViewData tvd = mTabMap.get(tab); + if (tvd != null) { + tvd.setFavicon(favicon); + } } diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java index 294e750..55bfb48 100644 --- a/src/com/android/browser/TabControl.java +++ b/src/com/android/browser/TabControl.java @@ -695,7 +695,7 @@ class TabControl { public void onFavicon(Tab tab, Bitmap favicon); - public void onPageStarted(Tab tab); + public void onPageStarted(Tab tab, Bitmap favicon); public void onPageFinished(Tab tab); |