From a2de6910df8a00f1d093ac7b72f8c3ec380fa433 Mon Sep 17 00:00:00 2001 From: Wes Johnston Date: Mon, 18 Jun 2012 12:39:13 -0700 Subject: [PATCH] Bug 759041 - Add an interface for tabs in the Awesomebar. r=lucasr --- mobile/android/base/Makefile.in | 1 + .../base/awesomebar/AwesomeBarTab.java | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 mobile/android/base/awesomebar/AwesomeBarTab.java diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index 9a68cc04623..f1898a18bd8 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -25,6 +25,7 @@ FENNEC_JAVA_FILES = \ AboutHomeSection.java \ AlertNotification.java \ AwesomeBar.java \ + awesomebar/AwesomeBarTab.java \ AwesomeBarTabs.java \ BrowserApp.java \ BrowserToolbar.java \ diff --git a/mobile/android/base/awesomebar/AwesomeBarTab.java b/mobile/android/base/awesomebar/AwesomeBarTab.java new file mode 100644 index 00000000000..cd148392e99 --- /dev/null +++ b/mobile/android/base/awesomebar/AwesomeBarTab.java @@ -0,0 +1,34 @@ +/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko; + +import android.content.Context; +import android.view.View; +import android.widget.TextView; +import android.widget.ImageView; +import android.widget.TabHost.TabContentFactory; + +abstract public class AwesomeBarTab { + abstract public String getTag(); + abstract public int getTitleStringId(); + abstract public void destroy(); + abstract public TabContentFactory getFactory(); + + // FIXME: This value should probably come from a prefs key + public static final int MAX_RESULTS = 100; + protected Context mContext = null; + + public AwesomeBarTab(Context context) { + mContext = context; + } + + protected class AwesomeEntryViewHolder { + public TextView titleView; + public TextView urlView; + public ImageView faviconView; + public ImageView bookmarkIconView; + } +}