Changes between Version 4 and Version 5 of QtWebKitPlugins


Ignore:
Timestamp:
Oct 18, 2009 2:35:12 AM (11 years ago)
Author:
Girish Ramakrishnan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QtWebKitPlugins

    v4 v5  
    1 This page documents the current status, code overview of (netscape) plugins on Qt/WebKit. Feel free to substitute 'plugins' with 'flash' when reading this document (since it's the main plugin we test with).
     1This page documents the current status, code overview of plugins on Qt/WebKit.
    22
    33= Overview =
    4 Qt/WebKit supports loading of netscape plugins. To enable loading of plugins, you must enable QWebSettings::PluginsEnabled.
     4Qt/WebKit supports loading of two kinds of plugins.
     5 * Qt based plugins - These can be QWidget or QGraphicsWidget based.
     6 * Netscape plugins (npapi)
     7
     8To enable loading of plugins, you must enable QWebSettings::PluginsEnabled.
     9
     10== Qt Based plugins ==
     11<object> are encapsulated in HTMLPlugInElement. FrameLoaderClient has a method createPlugin that returns the Widget that should be used as the plugin. FrameLoaderClientQt.cpp inspects the mimetype. With a mime type of application/x-qt-plugin or application/x-qt-styled-widget, the frameloader creates a QWidget using the QWebPluginFactory (QWebPluginFactory::create()). This QWidget is encapsulate in a QtPluginWidget (which is basically a WebCore Widget). The QWidget is created as a child of the QWebPageClient::pluginParent() (more information on this below).
     12
     13= Netscape plugins =
     14The rest of this document focuses on Netscape plugins. Feel free to substitute 'plugins' with 'flash' when reading this document (since it's the main plugin we test with).
    515
    616= Hacking =
     
    2333 * PluginDatabase.cpp - Takes care of locating the plugin library file. Provides PluginPackage(s).
    2434
    25 QWebPageClient - We require access to the QWidget (QGraphicsView/QWebView) or the parent (QGraphicsWebView/QWebView). To provide this and keep the plugin code working in both cases, the chrome (hostwindow) provides a platformPageClient() that helps us get information about the client of the QWebPage. Both QWebView and QGraphicsWebView provide objects that implement the virtuals in QWebPageClient.
     35QWebPageClient - We require access to the QWidget (QGraphicsView/QWebView) or the parent (QGraphicsWebView/QWebView). To provide this and keep the plugin code working in both cases, the chrome (hostwindow) provides a platformPageClient() that helps us get information about the client of the QWebPage. Both QWebView and QGraphicsWebView provide objects that implement the virtuals in QWebPageClient. QWebPageClient::ownerWidget() return the QWidget in which the page is displayed (i.e QWebView or the QGraphicsView). QWebPageClient::pluginParent() returns the parent QObject (i.e QWebView or QGraphicsWebView). The ownerWidget() is necessary for the popup code. The  pluginParent is necessary to position the plugins.
    2636
    2737= Platform Specific =