Example #1
0
bool NetscapePlugin::platformPostInitialize()
{
#if PLATFORM(GTK)
    if (moduleMixesGtkSymbols(m_pluginModule->module()))
        return false;
#endif

    uint64_t windowID = 0;
    bool needsXEmbed = false;
    if (m_isWindowed) {
        NPP_GetValue(NPPVpluginNeedsXEmbed, &needsXEmbed);
        if (needsXEmbed) {
            windowID = controller()->createPluginContainer();
            if (!windowID)
                return false;
        } else {
            notImplemented();
            return false;
        }
    }

    if (!(m_pluginDisplay = getPluginDisplay()))
        return false;

    NPSetWindowCallbackStruct* callbackStruct = new NPSetWindowCallbackStruct;
    callbackStruct->type = 0;
    m_npWindow.ws_info = callbackStruct;

    if (m_isWindowed)
        return platformPostInitializeWindowed(needsXEmbed, windowID);

    return platformPostInitializeWindowless();
}
Example #2
0
bool NetscapePlugin::platformPostInitialize()
{
    uint64_t windowID = 0;
    // NPPVpluginNeedsXEmbed is a boolean value, but at least the
    // Flash player plugin is using an 'int' instead.
    int needsXEmbed = 0;
    if (m_isWindowed) {
        NPP_GetValue(NPPVpluginNeedsXEmbed, &needsXEmbed);
        if (needsXEmbed) {
            windowID = controller()->createPluginContainer();
            if (!windowID)
                return false;
        } else {
            notImplemented();
            return false;
        }
    }

    if (!(m_pluginDisplay = getPluginDisplay()))
        return false;

    NPSetWindowCallbackStruct* callbackStruct = new NPSetWindowCallbackStruct;
    callbackStruct->type = 0;
    m_npWindow.ws_info = callbackStruct;

    if (m_isWindowed)
        return platformPostInitializeWindowed(needsXEmbed, windowID);

    return platformPostInitializeWindowless();
}