Changeset 73858 in webkit


Ignore:
Timestamp:
Dec 11, 2010 8:25:39 AM (13 years ago)
Author:
xan@webkit.org
Message:

2010-12-11 Xan Lopez <xlopez@igalia.com>

Reviewed by Martin Robinson.

[GTK] Add APIs for plugin management
https://bugs.webkit.org/show_bug.cgi?id=50827

Add WebKitWebPluginDatabase and WebKitWebPlugin classes for basic
plugin management at the client level. For now they provide
"read-only" access to the plugin list.

  • GNUmakefile.am: add new files to the build.
  • tests/testwebplugindatabase.c: Test that the database contains the test plugin, which should always be loaded.
  • webkit/webkit.h: add new headers.
  • webkit/webkitdefines.h: add new defines.
  • webkit/webkitwebplugin.cpp: An new class representing a plugin object.
  • webkit/webkitwebplugin.h: ditto.
  • webkit/webkitwebplugindatabase.cpp: A new class that contains the list of active plugins.
  • webkit/webkitwebplugindatabase.h: ditto.
  • webkit/webkitwebplugindatabaseprivate.h: Private header.
  • webkit/webkitwebpluginprivate.h: Private header.
  • webkit/webkitwebview.cpp: (webkit_get_web_plugin_database): returns the WebKitWebPluginDatabase for this session.
  • webkit/webkitwebview.h: add method to header.
Location:
trunk/WebKit/gtk
Files:
7 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r73855 r73858  
     12010-12-11  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] Add APIs for plugin management
     6        https://bugs.webkit.org/show_bug.cgi?id=50827
     7
     8        Add WebKitWebPluginDatabase and WebKitWebPlugin classes for basic
     9        plugin management at the client level. For now they provide
     10        "read-only" access to the plugin list.
     11
     12        * GNUmakefile.am: add new files to the build.
     13        * tests/testwebplugindatabase.c: Test that the database contains
     14        the test plugin, which should always be loaded.
     15        * webkit/webkit.h: add new headers.
     16        * webkit/webkitdefines.h: add new defines.
     17        * webkit/webkitwebplugin.cpp: An new class representing a plugin object.
     18        * webkit/webkitwebplugin.h: ditto.
     19        * webkit/webkitwebplugindatabase.cpp: A new class that contains the list of active plugins.
     20        * webkit/webkitwebplugindatabase.h: ditto.
     21        * webkit/webkitwebplugindatabaseprivate.h: Private header.
     22        * webkit/webkitwebpluginprivate.h: Private header.
     23        * webkit/webkitwebview.cpp:
     24        (webkit_get_web_plugin_database): returns the WebKitWebPluginDatabase for this session.
     25        * webkit/webkitwebview.h: add method to header.
     26
    1272010-12-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
    228
  • trunk/WebKit/gtk/GNUmakefile.am

    r73855 r73858  
    128128        $(srcdir)/WebKit/gtk/webkit/webkitwebinspector.h \
    129129        $(srcdir)/WebKit/gtk/webkit/webkitwebnavigationaction.h \
     130        $(srcdir)/WebKit/gtk/webkit/webkitwebplugin.h \
     131        $(srcdir)/WebKit/gtk/webkit/webkitwebplugindatabase.h \
    130132        $(srcdir)/WebKit/gtk/webkit/webkitwebpolicydecision.h \
    131133        $(srcdir)/WebKit/gtk/webkit/webkitwebresource.h \
     
    201203        WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
    202204        WebKit/gtk/webkit/webkitwebresource.cpp \
     205        WebKit/gtk/webkit/webkitwebplugin.cpp \
     206        WebKit/gtk/webkit/webkitwebpluginprivate.h \
     207        WebKit/gtk/webkit/webkitwebplugindatabase.cpp \
     208        WebKit/gtk/webkit/webkitwebplugindatabaseprivate.h \
    203209        WebKit/gtk/webkit/webkitwebsettings.cpp \
    204210        WebKit/gtk/webkit/webkitwebview.cpp \
     
    396402        Programs/unittests/testwebresource \
    397403        Programs/unittests/testwebdatasource \
     404        Programs/unittests/testwebplugindatabase \
    398405        Programs/unittests/testwebview \
    399406        Programs/unittests/testkeyevents \
     
    450457Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
    451458Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
     459
     460Programs_unittests_testwebplugindatabase_SOURCES = WebKit/gtk/tests/testwebplugindatabase.c
     461Programs_unittests_testwebplugindatabase_CFLAGS = -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" $(webkit_tests_cflags)
     462Programs_unittests_testwebplugindatabase_LDADD = $(webkit_tests_ldadd)
     463Programs_unittests_testwebplugindatabase_LDFLAGS = $(webkit_tests_ldflags)
    452464
    453465Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
  • trunk/WebKit/gtk/webkit/webkit.h

    r73608 r73858  
    4040#include <webkit/webkitwebbackforwardlist.h>
    4141#include <webkit/webkitwebhistoryitem.h>
     42#include <webkit/webkitwebplugin.h>
     43#include <webkit/webkitwebplugindatabase.h>
    4244#include <webkit/webkitwebpolicydecision.h>
    4345#include <webkit/webkitwebnavigationaction.h>
  • trunk/WebKit/gtk/webkit/webkitdefines.h

    r73608 r73858  
    9696typedef struct _WebKitViewportAttributesClass WebKitViewportAttributesClass;
    9797
     98typedef struct _WebKitWebPluginDatabase        WebKitWebPluginDatabase;
     99typedef struct _WebKitWebPluginDatabaseClass   WebKitWebPluginDatabaseClass;
     100
     101typedef struct _WebKitWebPlugin      WebKitWebPlugin;
     102typedef struct _WebKitWebPluginClass WebKitWebPluginClass;
     103
    98104G_END_DECLS
    99105
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r73855 r73858  
    9797#include "webkitwebpolicydecision.h"
    9898#include "webkitwebresource.h"
     99#include "webkitwebplugindatabaseprivate.h"
    99100#include "webkitwebviewprivate.h"
    100101#include <gdk/gdkkeysyms.h>
     
    51555156}
    51565157
     5158/**
     5159 * webkit_get_web_plugin_database:
     5160 *
     5161 * Returns the current #WebKitWebPluginDatabase with information about
     5162 * all the plugins WebKit knows about in this instance.
     5163 *
     5164 * Return value: (transfer none): the current #WebKitWebPluginDatabase
     5165 *
     5166 * Since: 1.3.8
     5167 */
     5168WebKitWebPluginDatabase* webkit_get_web_plugin_database()
     5169{
     5170    static WebKitWebPluginDatabase* database = 0;
     5171
     5172    webkit_init();
     5173
     5174    if (!database)
     5175        database = webkit_web_plugin_database_new();
     5176
     5177    return database;
     5178}
     5179
    51575180GtkMenu* webkit_web_view_get_context_menu(WebKitWebView* webView)
    51585181{
  • trunk/WebKit/gtk/webkit/webkitwebview.h

    r73608 r73858  
    365365webkit_get_default_session                      (void);
    366366
     367WEBKIT_API WebKitWebPluginDatabase *
     368webkit_get_web_plugin_database                  (void);
     369
    367370WEBKIT_API const gchar*
    368371webkit_web_view_get_encoding                    (WebKitWebView        * webView);
Note: See TracChangeset for help on using the changeset viewer.