Flutter Engine
flutter::JNIMock Class Referencefinal

#include <jni_mock.h>

Inheritance diagram for flutter::JNIMock:
flutter::PlatformViewAndroidJNI

Public Member Functions

 MOCK_METHOD (void, FlutterViewHandlePlatformMessage,(fml::RefPtr< flutter::PlatformMessage > message, int responseId),(override))
 
 MOCK_METHOD (void, FlutterViewHandlePlatformMessageResponse,(int responseId, std::unique_ptr< fml::Mapping > data),(override))
 
 MOCK_METHOD (void, FlutterViewUpdateSemantics,(std::vector< uint8_t > buffer, std::vector< std::string > strings),(override))
 
 MOCK_METHOD (void, FlutterViewUpdateCustomAccessibilityActions,(std::vector< uint8_t > actions_buffer, std::vector< std::string > strings),(override))
 
 MOCK_METHOD (void, FlutterViewOnFirstFrame,(),(override))
 
 MOCK_METHOD (void, FlutterViewOnPreEngineRestart,(),(override))
 
 MOCK_METHOD (void, SurfaceTextureAttachToGLContext,(JavaWeakGlobalRef surface_texture, int textureId),(override))
 
 MOCK_METHOD (void, SurfaceTextureUpdateTexImage,(JavaWeakGlobalRef surface_texture),(override))
 
 MOCK_METHOD (void, SurfaceTextureGetTransformMatrix,(JavaWeakGlobalRef surface_texture, SkMatrix &transform),(override))
 
 MOCK_METHOD (void, SurfaceTextureDetachFromGLContext,(JavaWeakGlobalRef surface_texture),(override))
 
 MOCK_METHOD (void, FlutterViewOnDisplayPlatformView,(int view_id, int x, int y, int width, int height, int viewWidth, int viewHeight, MutatorsStack mutators_stack),(override))
 
 MOCK_METHOD (void, FlutterViewDisplayOverlaySurface,(int surface_id, int x, int y, int width, int height),(override))
 
 MOCK_METHOD (void, FlutterViewBeginFrame,(),(override))
 
 MOCK_METHOD (void, FlutterViewEndFrame,(),(override))
 
 MOCK_METHOD (std::unique_ptr< PlatformViewAndroidJNI::OverlayMetadata >, FlutterViewCreateOverlaySurface,(),(override))
 
 MOCK_METHOD (void, FlutterViewDestroyOverlaySurfaces,(),(override))
 
 MOCK_METHOD (std::unique_ptr< std::vector< std::string >>, FlutterViewComputePlatformResolvedLocale,(std::vector< std::string > supported_locales_data),(override))
 
 MOCK_METHOD (double, GetDisplayRefreshRate,(),(override))
 
- Public Member Functions inherited from flutter::PlatformViewAndroidJNI
virtual ~PlatformViewAndroidJNI ()
 
virtual void FlutterViewHandlePlatformMessage (fml::RefPtr< flutter::PlatformMessage > message, int responseId)=0
 Sends a platform message. The message may be empty. More...
 
virtual void FlutterViewHandlePlatformMessageResponse (int responseId, std::unique_ptr< fml::Mapping > data)=0
 Responds to a platform message. The data may be a nullptr. More...
 
virtual void FlutterViewUpdateSemantics (std::vector< uint8_t > buffer, std::vector< std::string > strings)=0
 Sends semantics tree updates. More...
 
virtual void FlutterViewUpdateCustomAccessibilityActions (std::vector< uint8_t > actions_buffer, std::vector< std::string > strings)=0
 Sends new custom accessibility events. More...
 
virtual void FlutterViewOnFirstFrame ()=0
 Indicates that FlutterView should start painting pixels. More...
 
virtual void FlutterViewOnPreEngineRestart ()=0
 Indicates that a hot restart is about to happen. More...
 
virtual void SurfaceTextureAttachToGLContext (JavaWeakGlobalRef surface_texture, int textureId)=0
 Attach the SurfaceTexture to the OpenGL ES context that is current on the calling thread. More...
 
virtual void SurfaceTextureUpdateTexImage (JavaWeakGlobalRef surface_texture)=0
 Updates the texture image to the most recent frame from the image stream. More...
 
virtual void SurfaceTextureGetTransformMatrix (JavaWeakGlobalRef surface_texture, SkMatrix &transform)=0
 Gets the transform matrix from the SurfaceTexture. Then, it updates the transform matrix, so it fill the canvas and preserve the aspect ratio. More...
 
virtual void SurfaceTextureDetachFromGLContext (JavaWeakGlobalRef surface_texture)=0
 Detaches a SurfaceTexture from the OpenGL ES context. More...
 
virtual void FlutterViewOnDisplayPlatformView (int view_id, int x, int y, int width, int height, int viewWidth, int viewHeight, MutatorsStack mutators_stack)=0
 Positions and sizes a platform view if using hybrid composition. More...
 
virtual void FlutterViewDisplayOverlaySurface (int surface_id, int x, int y, int width, int height)=0
 Positions and sizes an overlay surface in hybrid composition. More...
 
virtual void FlutterViewBeginFrame ()=0
 Initiates a frame if using hybrid composition. More...
 
virtual void FlutterViewEndFrame ()=0
 Indicates that the current frame ended. It's used to clean up state. More...
 
virtual std::unique_ptr< PlatformViewAndroidJNI::OverlayMetadataFlutterViewCreateOverlaySurface ()=0
 Instantiates an overlay surface in hybrid composition and provides the necessary metadata to operate the surface in C. More...
 
virtual void FlutterViewDestroyOverlaySurfaces ()=0
 Destroys the overlay surfaces. More...
 
virtual std::unique_ptr< std::vector< std::string > > FlutterViewComputePlatformResolvedLocale (std::vector< std::string > supported_locales_data)=0
 Computes the locale Android would select. More...
 
virtual double GetDisplayRefreshRate ()=0
 

Detailed Description

Mock for |PlatformViewAndroidJNI|. This implementation can be used in unit tests without requiring the Android toolchain.

Definition at line 17 of file jni_mock.h.

Member Function Documentation

◆ MOCK_METHOD() [1/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewHandlePlatformMessage  ,
(fml::RefPtr< flutter::PlatformMessage > message, int responseId)  ,
(override)   
)

◆ MOCK_METHOD() [2/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewHandlePlatformMessageResponse  ,
(int responseId, std::unique_ptr< fml::Mapping > data)  ,
(override)   
)

◆ MOCK_METHOD() [3/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewUpdateSemantics  ,
(std::vector< uint8_t > buffer, std::vector< std::string > strings)  ,
(override)   
)

◆ MOCK_METHOD() [4/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewUpdateCustomAccessibilityActions  ,
(std::vector< uint8_t > actions_buffer, std::vector< std::string > strings)  ,
(override)   
)

◆ MOCK_METHOD() [5/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewOnFirstFrame  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [6/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewOnPreEngineRestart  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [7/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
SurfaceTextureAttachToGLContext  ,
(JavaWeakGlobalRef surface_texture, int textureId)  ,
(override)   
)

◆ MOCK_METHOD() [8/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
SurfaceTextureUpdateTexImage  ,
(JavaWeakGlobalRef surface_texture)  ,
(override)   
)

◆ MOCK_METHOD() [9/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
SurfaceTextureGetTransformMatrix  ,
(JavaWeakGlobalRef surface_texture, SkMatrix &transform ,
(override)   
)

◆ MOCK_METHOD() [10/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
SurfaceTextureDetachFromGLContext  ,
(JavaWeakGlobalRef surface_texture)  ,
(override)   
)

◆ MOCK_METHOD() [11/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewOnDisplayPlatformView  ,
(int view_id, int x, int y, int width, int height, int viewWidth, int viewHeight, MutatorsStack mutators_stack)  ,
(override)   
)

◆ MOCK_METHOD() [12/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewDisplayOverlaySurface  ,
(int surface_id, int x, int y, int width, int height ,
(override)   
)

◆ MOCK_METHOD() [13/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewBeginFrame  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [14/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewEndFrame  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [15/18]

flutter::JNIMock::MOCK_METHOD ( std::unique_ptr< PlatformViewAndroidJNI::OverlayMetadata ,
FlutterViewCreateOverlaySurface  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [16/18]

flutter::JNIMock::MOCK_METHOD ( void  ,
FlutterViewDestroyOverlaySurfaces  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [17/18]

flutter::JNIMock::MOCK_METHOD ( std::unique_ptr< std::vector< std::string >>  ,
FlutterViewComputePlatformResolvedLocale  ,
(std::vector< std::string > supported_locales_data)  ,
(override)   
)

◆ MOCK_METHOD() [18/18]

flutter::JNIMock::MOCK_METHOD ( double  ,
GetDisplayRefreshRate  ,
()  ,
(override)   
)

The documentation for this class was generated from the following file: