diff options
Diffstat (limited to 'src/com/android/browser/TabBar.java')
-rw-r--r-- | src/com/android/browser/TabBar.java | 11 |
1 files changed, 9 insertions, 2 deletions
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); + } } |