mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
c317230594
- Bug 1242724: add an export of runnable_utils.h unless/until it gets moved to xpcom/mfbt r=glandium (1d5e839f99) - Bug 1223240 - Make it easier to set up top-level protocols (r=jld) (3beaf4a6fa) - Bug 1194259: Make ICE IP restriction to default routes work in E10S r=jesup,mcmanus,drno (cbe463cf27) - Bug 1239584, Part 1 - Add nsIPushNotifier and nsIPushMessage interfaces. r=dragana (7b71518e7d) - Bug 1239584, Part 2 - Remove message manager usage from `PushService.jsm`. r=dragana (f76ab36278) - Bug 1210211 - Part 3: Test for push notification quota with web notifications. r=kitcambridge (f37472f9b2) - Bug 1189998, Part 3 - Update consolidated Push tests. r=mt (fae3b02e6e) - Bug 1225968 - Refactor data delivery tests to support addition of new tests, r=kitcambridge (3163083135) - Bug 1225968 - Adding more messages to the push message tests, r=kitcambridge (7e1bac99ba) - Bug 1239558 - Exempt system Push subscriptions from quota and permissions checks. r=dragana (0dd8399414) - Bug 1239584, Part 3 - Update tests. r=dragana (937e339387) - Bug 1165256 - Make appcache fully work with OriginAttribues. r=jduell (91d666752a) - reapply Bug 1232506: Make dom/devicestorage really work with e10s. r=alchen (bd77941ea9) - Bug 1236433 - Part 1: Provide a Native Wrapper to Allow Fallback Whenproperty_get/set is Unavailable; r=edgar (f9026a7f50) - Bug 1168959 - Memory-safety bugs in NetworkUtils.cpp generally. r=fabrice (13c6c14168) - Bug 1236433 - Part 2: Adopt Wrapper in Network Utilities; r=edgar (dde58ea083) - Bug 1209654 - Modify the type of the threshold of addAlarm() and getAllAlarms() to long long from long, and add test cases. r=ettseng, r=bz (79c7e31440) - Bug 1000040 - Part 1: Add required APIs for Ethernet; r=vicamo,bholley (fcff7c8078) - Bug 1231306 - Handle plugin state changes correctly in content process (r=jimm) (1f2daa6ad4) - Bug 1213454: Ensure that mSupportsAsyncInit is propagated from content process; r=jimm (e86f36fe0a) - Bug 1246574 - Store sandbox level to nsPluginTag for e10s. r=jimm (04617c8d28) - Bug 1201904 - Force windowless mode for Flash when sandbox level >= 2. r=bsmedberg (662c6612a2) - Bug 1233619 (part 1) - Remove unneeded gfxContext argument from EndUpdate() and EndUpdateBackground() functions. r=roc. (1f74728aec) - Bug 1233619 (part 2) - Moz2Dify BeginUpdate() and BeginUpdateBackground() functions. r=roc. (36accc1499) - Bug 1243656 - Use async for RequestCommitOrCancel. r=masayuki (aa57ea37dc) - Bug 1243268 - Support ImmSetCandidateWindow(CFS_EXCLUDE) on plugin process. r=masayuki (78975bd3e4) - Bug 1235573 - Don't post GCS_RESULTSTR when plugin doesn't handle WM_IME_COMPOSITION correctly. r=masayuki (11690062a3) - Bug 1173371 Part 1: Take Chromium commit 0e49d029d5a1a25d971880b9e44d67ac70b31a80 for sandbox code. r=aklotz (517cb91822) - Bug 1157864 - Record chromium patch applied in previous commit. r=me (dc1e63191b) - Bug 1173371 Part 2: Change Chromium sandbox to allow rules for files on network drives to be added. a=aklotz (2bd72777e5) - Bug 1173371 Part 3: Add sandbox policy rule to allow read access to the Firefox program directory when it is on a network drive. r=aklotz (c0a180d4b8) - Bug 1244774: Correct wchar_t/char16_t VS2015 compilation problem caused by patches for bug 1173371. r=jimm (d5326694f8)
150 lines
5.3 KiB
C++
150 lines
5.3 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
* vim: sw=4 ts=4 et :
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef PluginPRLibrary_h
|
|
#define PluginPRLibrary_h 1
|
|
|
|
#include "mozilla/PluginLibrary.h"
|
|
#include "nsNPAPIPlugin.h"
|
|
#include "npfunctions.h"
|
|
|
|
namespace mozilla {
|
|
|
|
class PluginPRLibrary : public PluginLibrary
|
|
{
|
|
public:
|
|
PluginPRLibrary(const char* aFilePath, PRLibrary* aLibrary) :
|
|
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
|
mNP_Initialize(nullptr),
|
|
#else
|
|
mNP_Initialize(nullptr),
|
|
#endif
|
|
mNP_Shutdown(nullptr),
|
|
mNP_GetMIMEDescription(nullptr),
|
|
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
|
mNP_GetValue(nullptr),
|
|
#endif
|
|
#if defined(XP_WIN) || defined(XP_MACOSX)
|
|
mNP_GetEntryPoints(nullptr),
|
|
#endif
|
|
mNPP_New(nullptr),
|
|
mNPP_ClearSiteData(nullptr),
|
|
mNPP_GetSitesWithData(nullptr),
|
|
mLibrary(aLibrary),
|
|
mFilePath(aFilePath)
|
|
{
|
|
NS_ASSERTION(mLibrary, "need non-null lib");
|
|
// addref here??
|
|
}
|
|
|
|
virtual ~PluginPRLibrary()
|
|
{
|
|
// unref here??
|
|
}
|
|
|
|
virtual void SetPlugin(nsNPAPIPlugin*) override { }
|
|
|
|
virtual bool HasRequiredFunctions() override {
|
|
mNP_Initialize = (NP_InitializeFunc)
|
|
PR_FindFunctionSymbol(mLibrary, "NP_Initialize");
|
|
if (!mNP_Initialize)
|
|
return false;
|
|
|
|
mNP_Shutdown = (NP_ShutdownFunc)
|
|
PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
|
|
if (!mNP_Shutdown)
|
|
return false;
|
|
|
|
mNP_GetMIMEDescription = (NP_GetMIMEDescriptionFunc)
|
|
PR_FindFunctionSymbol(mLibrary, "NP_GetMIMEDescription");
|
|
#ifndef XP_MACOSX
|
|
if (!mNP_GetMIMEDescription)
|
|
return false;
|
|
#endif
|
|
|
|
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
|
mNP_GetValue = (NP_GetValueFunc)
|
|
PR_FindFunctionSymbol(mLibrary, "NP_GetValue");
|
|
if (!mNP_GetValue)
|
|
return false;
|
|
#endif
|
|
|
|
#if defined(XP_WIN) || defined(XP_MACOSX)
|
|
mNP_GetEntryPoints = (NP_GetEntryPointsFunc)
|
|
PR_FindFunctionSymbol(mLibrary, "NP_GetEntryPoints");
|
|
if (!mNP_GetEntryPoints)
|
|
return false;
|
|
#endif
|
|
return true;
|
|
}
|
|
|
|
#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
|
|
virtual nsresult NP_Initialize(NPNetscapeFuncs* aNetscapeFuncs,
|
|
NPPluginFuncs* aFuncs, NPError* aError) override;
|
|
#else
|
|
virtual nsresult NP_Initialize(NPNetscapeFuncs* aNetscapeFuncs,
|
|
NPError* aError) override;
|
|
#endif
|
|
|
|
virtual nsresult NP_Shutdown(NPError* aError) override;
|
|
virtual nsresult NP_GetMIMEDescription(const char** aMimeDesc) override;
|
|
|
|
virtual nsresult NP_GetValue(void* aFuture, NPPVariable aVariable,
|
|
void* aValue, NPError* aError) override;
|
|
|
|
#if defined(XP_WIN) || defined(XP_MACOSX)
|
|
virtual nsresult NP_GetEntryPoints(NPPluginFuncs* aFuncs, NPError* aError) override;
|
|
#endif
|
|
|
|
virtual nsresult NPP_New(NPMIMEType aPluginType, NPP aInstance,
|
|
uint16_t aMode, int16_t aArgc, char* aArgn[],
|
|
char* aArgv[], NPSavedData* aSaved,
|
|
NPError* aError) override;
|
|
|
|
virtual nsresult NPP_ClearSiteData(const char* aSite, uint64_t aFlags,
|
|
uint64_t aMaxAge) override;
|
|
virtual nsresult NPP_GetSitesWithData(InfallibleTArray<nsCString>& aResult) override;
|
|
|
|
virtual nsresult AsyncSetWindow(NPP aInstance, NPWindow* aWindow) override;
|
|
virtual nsresult GetImageContainer(NPP aInstance, mozilla::layers::ImageContainer** aContainer) override;
|
|
virtual nsresult GetImageSize(NPP aInstance, nsIntSize* aSize) override;
|
|
virtual bool IsOOP() override { return false; }
|
|
#if defined(XP_MACOSX)
|
|
virtual nsresult IsRemoteDrawingCoreAnimation(NPP aInstance, bool* aDrawing) override;
|
|
virtual nsresult ContentsScaleFactorChanged(NPP aInstance, double aContentsScaleFactor) override;
|
|
#endif
|
|
virtual nsresult SetBackgroundUnknown(NPP instance) override;
|
|
virtual nsresult BeginUpdateBackground(NPP instance, const nsIntRect&,
|
|
DrawTarget** aDrawTarget) override;
|
|
virtual nsresult EndUpdateBackground(NPP instance,
|
|
const nsIntRect&) override;
|
|
virtual void DidComposite(NPP aInstance) override { }
|
|
virtual void GetLibraryPath(nsACString& aPath) { aPath.Assign(mFilePath); }
|
|
virtual nsresult GetRunID(uint32_t* aRunID) override { return NS_ERROR_NOT_IMPLEMENTED; }
|
|
virtual void SetHasLocalInstance() override { }
|
|
|
|
private:
|
|
NP_InitializeFunc mNP_Initialize;
|
|
NP_ShutdownFunc mNP_Shutdown;
|
|
NP_GetMIMEDescriptionFunc mNP_GetMIMEDescription;
|
|
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
|
NP_GetValueFunc mNP_GetValue;
|
|
#endif
|
|
#if defined(XP_WIN) || defined(XP_MACOSX)
|
|
NP_GetEntryPointsFunc mNP_GetEntryPoints;
|
|
#endif
|
|
NPP_NewProcPtr mNPP_New;
|
|
NPP_ClearSiteDataPtr mNPP_ClearSiteData;
|
|
NPP_GetSitesWithDataPtr mNPP_GetSitesWithData;
|
|
PRLibrary* mLibrary;
|
|
nsCString mFilePath;
|
|
};
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
#endif // ifndef PluginPRLibrary_h
|