diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-20 12:44:29 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:49:22 +0200 |
commit | 2f23073a3a4d00f0f46849045aad41913f977b5a (patch) | |
tree | 207ed283735ff6c5c54e7c977f172d82cd47f74a /dom/plugins/base/nsNPAPIPluginInstance.h | |
parent | 496fbaf738fb00824d7e972e874bfdbe85caaee5 (diff) | |
download | UXP-2f23073a3a4d00f0f46849045aad41913f977b5a.tar UXP-2f23073a3a4d00f0f46849045aad41913f977b5a.tar.gz UXP-2f23073a3a4d00f0f46849045aad41913f977b5a.tar.lz UXP-2f23073a3a4d00f0f46849045aad41913f977b5a.tar.xz UXP-2f23073a3a4d00f0f46849045aad41913f977b5a.zip |
Issue #1053 - Remove android support from NPAPI
Diffstat (limited to 'dom/plugins/base/nsNPAPIPluginInstance.h')
-rw-r--r-- | dom/plugins/base/nsNPAPIPluginInstance.h | 127 |
1 files changed, 1 insertions, 126 deletions
diff --git a/dom/plugins/base/nsNPAPIPluginInstance.h b/dom/plugins/base/nsNPAPIPluginInstance.h index 5f0375637..48e62517d 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.h +++ b/dom/plugins/base/nsNPAPIPluginInstance.h @@ -18,15 +18,6 @@ #include <prinrval.h> #include "js/TypeDecls.h" #include "nsIAudioChannelAgent.h" -#ifdef MOZ_WIDGET_ANDROID -#include "nsIRunnable.h" -#include "GLContextTypes.h" -#include "AndroidSurfaceTexture.h" -#include "AndroidBridge.h" -#include <map> -class PluginEventRunnable; -#endif - #include "mozilla/EventForwards.h" #include "mozilla/TimeStamp.h" #include "mozilla/PluginLibrary.h" @@ -163,90 +154,6 @@ public: } #endif -#ifdef MOZ_WIDGET_ANDROID - void NotifyForeground(bool aForeground); - void NotifyOnScreen(bool aOnScreen); - void MemoryPressure(); - void NotifyFullScreen(bool aFullScreen); - void NotifySize(nsIntSize size); - - nsIntSize CurrentSize() { return mCurrentSize; } - - bool IsOnScreen() { - return mOnScreen; - } - - uint32_t GetANPDrawingModel() { return mANPDrawingModel; } - void SetANPDrawingModel(uint32_t aModel); - - void* GetJavaSurface(); - - void PostEvent(void* event); - - // These are really mozilla::dom::ScreenOrientation, but it's - // difficult to include that here - uint32_t FullScreenOrientation() { return mFullScreenOrientation; } - void SetFullScreenOrientation(uint32_t orientation); - - void SetWakeLock(bool aLock); - - mozilla::gl::GLContext* GLContext(); - - // For ANPOpenGL - class TextureInfo { - public: - TextureInfo() : - mTexture(0), mWidth(0), mHeight(0), mInternalFormat(0) - { - } - - TextureInfo(GLuint aTexture, int32_t aWidth, int32_t aHeight, GLuint aInternalFormat) : - mTexture(aTexture), mWidth(aWidth), mHeight(aHeight), mInternalFormat(aInternalFormat) - { - } - - GLuint mTexture; - int32_t mWidth; - int32_t mHeight; - GLuint mInternalFormat; - }; - - // For ANPNativeWindow - void* AcquireContentWindow(); - - mozilla::gl::AndroidSurfaceTexture* AsSurfaceTexture(); - - // For ANPVideo - class VideoInfo { - public: - VideoInfo(mozilla::gl::AndroidSurfaceTexture* aSurfaceTexture) : - mSurfaceTexture(aSurfaceTexture) - { - } - - ~VideoInfo() - { - mSurfaceTexture = nullptr; - } - - RefPtr<mozilla::gl::AndroidSurfaceTexture> mSurfaceTexture; - gfxRect mDimensions; - }; - - void* AcquireVideoWindow(); - void ReleaseVideoWindow(void* aWindow); - void SetVideoDimensions(void* aWindow, gfxRect aDimensions); - - void GetVideos(nsTArray<VideoInfo*>& aVideos); - - void SetOriginPos(mozilla::gl::OriginPos aOriginPos) { - mOriginPos = aOriginPos; - } - mozilla::gl::OriginPos OriginPos() const { return mOriginPos; } - - static nsNPAPIPluginInstance* GetFromNPP(NPP npp); -#endif - nsresult NewStreamListener(const char* aURL, void* notifyData, nsNPAPIPluginStreamListener** listener); @@ -347,23 +254,6 @@ protected: NPDrawingModel mDrawingModel; -#ifdef MOZ_WIDGET_ANDROID - uint32_t mANPDrawingModel; - - friend class PluginEventRunnable; - - nsTArray<RefPtr<PluginEventRunnable>> mPostedEvents; - void PopPostedEvent(PluginEventRunnable* r); - void OnSurfaceTextureFrameAvailable(); - - uint32_t mFullScreenOrientation; - bool mWakeLocked; - bool mFullScreen; - mozilla::gl::OriginPos mOriginPos; - - RefPtr<mozilla::gl::AndroidSurfaceTexture> mContentSurface; -#endif - enum { NOT_STARTED, RUNNING, @@ -410,15 +300,6 @@ private: // This is only valid when the plugin is actually stopped! mozilla::TimeStamp mStopTime; -#ifdef MOZ_WIDGET_ANDROID - already_AddRefed<mozilla::gl::AndroidSurfaceTexture> CreateSurfaceTexture(); - - std::map<void*, VideoInfo*> mVideos; - bool mOnScreen; - - nsIntSize mCurrentSize; -#endif - // is this instance Java and affected by bug 750480? bool mHaveJavaC2PJSObjectQuirk; @@ -434,13 +315,7 @@ private: bool mMuted; }; -// On Android, we need to guard against plugin code leaking entries in the local -// JNI ref table. See https://bugzilla.mozilla.org/show_bug.cgi?id=780831#c21 -#ifdef MOZ_WIDGET_ANDROID - #define MAIN_THREAD_JNI_REF_GUARD mozilla::AutoLocalJNIFrame jniFrame -#else - #define MAIN_THREAD_JNI_REF_GUARD -#endif +#define MAIN_THREAD_JNI_REF_GUARD void NS_NotifyBeginPluginCall(NSPluginCallReentry aReentryState); void NS_NotifyPluginCall(NSPluginCallReentry aReentryState); |