зеркало из https://github.com/mozilla/gecko-dev.git
Bug 710511: Rename DrawingModel to ANPDrawingModel r=snorp
This commit is contained in:
Родитель
71565c1d3f
Коммит
38f797fcf5
|
@ -2507,7 +2507,7 @@ _setvalue(NPP npp, NPPVariable variable, void *result)
|
|||
#ifdef MOZ_WIDGET_ANDROID
|
||||
case kRequestDrawingModel_ANPSetValue:
|
||||
if (inst)
|
||||
inst->SetDrawingModel(NS_PTR_TO_INT32(result));
|
||||
inst->SetANPDrawingModel(NS_PTR_TO_INT32(result));
|
||||
return NPERR_NO_ERROR;
|
||||
case kAcceptEvents_ANPSetValue:
|
||||
return NPERR_NO_ERROR;
|
||||
|
|
|
@ -89,7 +89,7 @@ nsNPAPIPluginInstance::nsNPAPIPluginInstance(nsNPAPIPlugin* plugin)
|
|||
#endif
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
mSurface(nsnull),
|
||||
mDrawingModel(0),
|
||||
mANPDrawingModel(0),
|
||||
#endif
|
||||
mRunning(NOT_STARTED),
|
||||
mWindowless(false),
|
||||
|
@ -731,10 +731,11 @@ void nsNPAPIPluginInstance::SetEventModel(NPEventModel aModel)
|
|||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
void nsNPAPIPluginInstance::SetDrawingModel(PRUint32 aModel)
|
||||
void nsNPAPIPluginInstance::SetANPDrawingModel(PRUint32 aModel)
|
||||
{
|
||||
mDrawingModel = aModel;
|
||||
mANPDrawingModel = aModel;
|
||||
}
|
||||
|
||||
class SurfaceGetter : public nsRunnable {
|
||||
public:
|
||||
SurfaceGetter(nsNPAPIPluginInstance* aInstance, NPPluginFuncs* aPluginFunctions, NPP_t aNPP) :
|
||||
|
@ -760,7 +761,7 @@ private:
|
|||
|
||||
void* nsNPAPIPluginInstance::GetJavaSurface()
|
||||
{
|
||||
if (mDrawingModel != kSurface_ANPDrawingModel)
|
||||
if (mANPDrawingModel != kSurface_ANPDrawingModel)
|
||||
return nsnull;
|
||||
|
||||
return mSurface;
|
||||
|
@ -785,7 +786,7 @@ void nsNPAPIPluginInstance::RequestJavaSurface()
|
|||
|
||||
nsresult nsNPAPIPluginInstance::GetDrawingModel(PRInt32* aModel)
|
||||
{
|
||||
#if defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID)
|
||||
#if defined(XP_MACOSX)
|
||||
*aModel = (PRInt32)mDrawingModel;
|
||||
return NS_OK;
|
||||
#else
|
||||
|
|
|
@ -150,7 +150,8 @@ public:
|
|||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
void SetDrawingModel(PRUint32 aModel);
|
||||
PRUint32 GetANPDrawingModel() { return mANPDrawingModel; }
|
||||
void SetANPDrawingModel(PRUint32 aModel);
|
||||
void* GetJavaSurface();
|
||||
void SetJavaSurface(void* aSurface);
|
||||
void RequestJavaSurface();
|
||||
|
@ -229,7 +230,7 @@ protected:
|
|||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
PRUint32 mDrawingModel;
|
||||
PRUint32 mANPDrawingModel;
|
||||
nsCOMPtr<nsIRunnable> mSurfaceGetter;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2868,8 +2868,7 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext,
|
|||
if (!mInstance || !mObjectFrame)
|
||||
return;
|
||||
|
||||
PRInt32 model;
|
||||
mInstance->GetDrawingModel(&model);
|
||||
PRInt32 model = mInstance->GetANPDrawingModel();
|
||||
|
||||
if (model == kSurface_ANPDrawingModel) {
|
||||
if (!AddPluginView(aFrameRect)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче