FileDocCategorySizeDatePackage
PluginList.javaAPI DocAndroid 1.5 API2236Wed May 06 22:41:56 BST 2009android.webkit

PluginList

public class PluginList extends Object
A simple list of initialized plugins. This list gets populated when the plugins are initialized (at browser startup, at the moment).

Fields Summary
private ArrayList
mPlugins
Constructors Summary
public PluginList()
Public constructor. Initializes the list of plugins.

        mPlugins = new ArrayList<Plugin>();
    
Methods Summary
public synchronized voidaddPlugin(Plugin plugin)
Adds a plugin to the list.

        if (!mPlugins.contains(plugin)) {
            mPlugins.add(plugin);
        }
    
public synchronized voidclear()
Clears the plugin list.

        mPlugins.clear();
    
public synchronized java.util.ListgetList()
Returns the list of plugins as a java.util.List.

        return mPlugins;
    
public synchronized voidpluginClicked(android.content.Context context, int position)
Dispatches the click event to the appropriate plugin.

        try {
            Plugin plugin = mPlugins.get(position);
            plugin.dispatchClickEvent(context);
        } catch (IndexOutOfBoundsException e) {
            // This can happen if the list of plugins
            // gets changed while the pref menu is up.
        }
    
public synchronized voidremovePlugin(Plugin plugin)
Removes a plugin from the list.

        int location = mPlugins.indexOf(plugin);
        if (location != -1) {
            mPlugins.remove(location);
        }