Changeset 49574 in webkit


Ignore:
Timestamp:
Oct 14, 2009 10:42:12 AM (15 years ago)
Author:
yael.aharon@nokia.com
Message:

Enabling NPAPI plugin support on Qt Webkit for S60 platform
https://bugs.webkit.org/show_bug.cgi?id=29302

Patch by Yael Aharon <yael.aharon@nokia.com> on 2009-10-14
Reviewed by

Also implemented by Mahesh Kulkarni<mahesh.kulkarni@nokia.com>,
Rohini Ananth <rohini.ananth@nokia.com> and help from Norbert Lesr
<norbert.leser@nokia.com>

Location:
trunk/WebCore
Files:
7 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r49571 r49574  
     12009-10-14  Yael Aharon  <yael.aharon@nokia.com>
     2 
     3        Reviewed by
     4 
     5        Enabling NPAPI plugin support on Qt Webkit for S60 platform
     6        https://bugs.webkit.org/show_bug.cgi?id=29302
     7
     8        Also implemented by Mahesh Kulkarni<mahesh.kulkarni@nokia.com>,
     9        Rohini Ananth <rohini.ananth@nokia.com> and help from Norbert Lesr
     10        <norbert.leser@nokia.com>
     11         
     12        * WebCore.pro:
     13        Enabling ENABLE_NETSCAPE_PLUGIN_API for S60 and added S60 specific
     14        new plugin files to be compiled under symbian: macro
     15
     16        * bridge/npapi.h:
     17        Added NPEvent and NPRegion definition for Symbian
     18
     19        * plugins/PluginPackage.h:
     20        Added S60 specific plugin interface and plugin loader variables
     21        * plugins/PluginPackage.cpp:
     22        (WebCore::PluginPackage::unload): Added !PLATFORM(SYMBIAN) macro.
     23        Default implementation to be used only for non-symbian platform
     24        * plugins/PluginDatabase.cpp:
     25        Macro !SYMBIAN checking
     26        * plugins/PluginView.h:
     27        Add Symbian to platforms that support setNPWindowIfNeeded
     28        * plugins/PluginView.cpp:
     29        (WebCore::PluginView::setFrameRect): Add Symbian to platforms that
     30        call setNPWindowRect from setFrameRect
     31         
     32        Added folder 'symbian' which contains implementation files for S60
     33        platform-specific NPAPI plugin functionality, under /plugins folder
     34        * plugins/symbian
     35        * plugins/symbian/npinterface.h:
     36        Plugin Interface to be implemented by S60 NPAPI plugins
     37        * plugins/symbian/PluginContainerSymbian.h:
     38        * plugins/symbian/PluginContainerSymbian.cpp:
     39        * plugins/symbian/PluginDatabaseSymbian.cpp:
     40        * plugins/symbian/PluginViewSymbian.cpp:
     41        * plugins/symbian/PluginPackageSymbian.cpp:
     42
    1432009-10-14  Chris Marrin  <cmarrin@apple.com>
    244
  • trunk/WebCore/WebCore.pro

    r49515 r49574  
    165165# Nescape plugins support (NPAPI)
    166166!contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=.) {
    167     unix|win32-*:!embedded:!wince*:!symbian {
     167    unix|win32-*:!embedded:!wince*: {
    168168        DEFINES += ENABLE_NETSCAPE_PLUGIN_API=1
    169169    } else {
     
    24582458    SOURCES += plugins/npapi.cpp
    24592459
    2460     unix {
    2461         mac {
    2462             SOURCES += \
    2463                 plugins/mac/PluginPackageMac.cpp \
    2464                 plugins/mac/PluginViewMac.cpp
    2465             OBJECTIVE_SOURCES += \
    2466                 platform/text/mac/StringImplMac.mm \
    2467                 platform/mac/WebCoreNSStringExtras.mm
    2468             INCLUDEPATH += platform/mac
    2469             # Note: XP_MACOSX is defined in npapi.h
    2470         } else {
    2471             !embedded: CONFIG += x11
    2472             SOURCES += \
    2473                 plugins/qt/PluginContainerQt.cpp \
    2474                 plugins/qt/PluginPackageQt.cpp \
    2475                 plugins/qt/PluginViewQt.cpp
    2476             HEADERS += \
    2477                 plugins/qt/PluginContainerQt.h
    2478             DEFINES += XP_UNIX
     2460    symbian {
     2461        SOURCES += \
     2462        plugins/symbian/PluginPackageSymbian.cpp \
     2463        plugins/symbian/PluginDatabaseSymbian.cpp \
     2464        plugins/symbian/PluginViewSymbian.cpp \
     2465        plugins/symbian/PluginContainerSymbian.cpp
     2466
     2467        HEADERS += \
     2468        plugins/symbian/PluginContainerSymbian.h \
     2469        plugins/symbian/npinterface.h
     2470
     2471        LIBS += -lefsrv
     2472
     2473    } else {
     2474
     2475        unix {
     2476   
     2477            mac {
     2478                SOURCES += \
     2479                    plugins/mac/PluginPackageMac.cpp \
     2480                    plugins/mac/PluginViewMac.cpp
     2481                OBJECTIVE_SOURCES += \
     2482                    platform/text/mac/StringImplMac.mm \
     2483                    platform/mac/WebCoreNSStringExtras.mm
     2484                INCLUDEPATH += platform/mac
     2485                # Note: XP_MACOSX is defined in npapi.h
     2486            } else {
     2487                !embedded: CONFIG += x11
     2488                SOURCES += \
     2489                    plugins/qt/PluginContainerQt.cpp \
     2490                    plugins/qt/PluginPackageQt.cpp \
     2491                    plugins/qt/PluginViewQt.cpp
     2492                HEADERS += \
     2493                    plugins/qt/PluginContainerQt.h
     2494                DEFINES += XP_UNIX
     2495            }
    24792496        }
    2480     }
    2481 
    2482     win32-* {
    2483         INCLUDEPATH += $$PWD/plugins/win
    2484 
    2485         SOURCES += page/win/PageWin.cpp \
    2486                    plugins/win/PluginDatabaseWin.cpp \
    2487                    plugins/win/PluginPackageWin.cpp \
    2488                    plugins/win/PluginMessageThrottlerWin.cpp \
    2489                    plugins/win/PluginViewWin.cpp
    2490 
    2491         LIBS += \
    2492             -ladvapi32 \
    2493             -lgdi32 \
    2494             -lshell32 \
    2495             -lshlwapi \
    2496             -luser32 \
    2497             -lversion
     2497   
     2498        win32-* {
     2499            INCLUDEPATH += $$PWD/plugins/win
     2500   
     2501            SOURCES += page/win/PageWin.cpp \
     2502                       plugins/win/PluginDatabaseWin.cpp \
     2503                       plugins/win/PluginPackageWin.cpp \
     2504                       plugins/win/PluginMessageThrottlerWin.cpp \
     2505                       plugins/win/PluginViewWin.cpp
     2506   
     2507            LIBS += \
     2508                -ladvapi32 \
     2509                -lgdi32 \
     2510                -lshell32 \
     2511                -lshlwapi \
     2512                -luser32 \
     2513                -lversion
     2514        }
    24982515    }
    24992516
  • trunk/WebCore/bridge/npapi.h

    r48174 r49574  
    105105    #include <X11/Xutil.h>
    106106    #include <stdio.h>
     107#endif
     108
     109#if defined(XP_SYMBIAN)
     110    #include <QEvent>
     111    #include <QRegion>
    107112#endif
    108113
     
    527532    NPRect    clipRect;    /* Clipping rectangle in port coordinates */
    528533                        /* Used by MAC only.              */
    529 #ifdef XP_UNIX
     534#if defined(XP_UNIX) || defined(XP_SYMBIAN)
    530535    void *    ws_info;    /* Platform-dependent additonal data */
    531 #endif /* XP_UNIX */
     536#endif /* XP_UNIX || XP_SYMBIAN */
    532537    NPWindowType type;    /* Is this a window or a drawable? */
    533538} NPWindow;
     
    579584#endif
    580585
     586#elif defined(XP_SYMBIAN)
     587typedef QEvent NPEvent;
    581588#elif defined(XP_WIN)
    582589typedef struct _NPEvent
     
    609616#elif defined(XP_UNIX)
    610617typedef Region NPRegion;
     618#elif defined(XP_SYMBIAN)
     619typedef QRegion* NPRegion;
    611620#else
    612621typedef void *NPRegion;
  • trunk/WebCore/plugins/PluginDatabase.cpp

    r49112 r49574  
    321321}
    322322
    323 #if !PLATFORM(WIN_OS) || PLATFORM(WX)
     323#if (!PLATFORM(SYMBIAN)) && (!PLATFORM(WIN_OS) || PLATFORM(WX))
    324324// For Safari/Win the following three methods are implemented
    325325// in PluginDatabaseWin.cpp, but if we can use WebCore constructs
     
    429429}
    430430
    431 #endif // !PLATFORM(WIN_OS)
    432 
    433 }
     431#endif // !PLATFORM(SYMBIAN) && !PLATFORM(WIN_OS)
     432
     433}
  • trunk/WebCore/plugins/PluginPackage.cpp

    r49169 r49574  
    114114}
    115115
     116#if !PLATFORM(SYMBIAN)
    116117void PluginPackage::unload()
    117118{
     
    126127    unloadWithoutShutdown();
    127128}
     129#endif //!PLATFORM(SYMBIAN)
    128130
    129131void PluginPackage::unloadWithoutShutdown()
  • trunk/WebCore/plugins/PluginPackage.h

    r46540 r49574  
    3737#include <wtf/RefCounted.h>
    3838
     39#if PLATFORM(SYMBIAN)
     40class QPluginLoader;
     41class NPInterface;
     42#endif
     43
    3944namespace WebCore {
    4045    typedef HashMap<String, String> MIMEToDescriptionsMap;
     
    7176        PluginQuirkSet quirks() const { return m_quirks; }
    7277        const PlatformModuleVersion& version() const { return m_moduleVersion; }
     78#if PLATFORM(SYMBIAN)
     79        NPInterface* npInterface() const { return m_npInterface; }
     80#endif // PLATFORM(SYMBIAN)
    7381
    7482    private:
    7583        PluginPackage(const String& path, const time_t& lastModified);
     84
     85#if PLATFORM(SYMBIAN)
     86        NPInterface* m_npInterface;
     87        QPluginLoader* m_pluginLoader;
     88#endif // PLATFORM(SYMBIAN)
    7689        bool fetchInfo();
    7790        bool isPluginBlacklisted();
  • trunk/WebCore/plugins/PluginView.cpp

    r49418 r49574  
    125125    updatePluginWidget();
    126126
    127 #if PLATFORM(WIN_OS)
    128     // On Windows, always call plugin to change geometry.
     127#if PLATFORM(WIN_OS) || PLATFORM(SYMBIAN)
     128    // On Windows and Symbian, always call plugin to change geometry.
    129129    setNPWindowRect(rect);
    130130#elif XP_UNIX
  • trunk/WebCore/plugins/PluginView.h

    r49418 r49574  
    312312private:
    313313
    314 #if defined(XP_UNIX) || defined(Q_WS_X11)
     314#if defined(XP_UNIX) || defined(Q_WS_X11) || PLATFORM(SYMBIAN)
    315315        void setNPWindowIfNeeded();
    316316#elif defined(XP_MACOSX)
Note: See TracChangeset for help on using the changeset viewer.