Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
flutter::PlatformMessageHandler Class Referenceabstract

#include <platform_message_handler.h>

Inheritance diagram for flutter::PlatformMessageHandler:
flutter::PlatformMessageHandlerAndroid flutter::PlatformMessageHandlerIos flutter::PlatformViewEmbedder::EmbedderPlatformMessageHandler

Public Member Functions

virtual ~PlatformMessageHandler ()=default
 
virtual void HandlePlatformMessage (std::unique_ptr< PlatformMessage > message)=0
 
virtual bool DoesHandlePlatformMessageOnPlatformThread () const =0
 
virtual void InvokePlatformMessageResponseCallback (int response_id, std::unique_ptr< fml::Mapping > mapping)=0
 
virtual void InvokePlatformMessageEmptyResponseCallback (int response_id)=0
 

Detailed Description

An interface over the ability to handle PlatformMessages that are being sent from Flutter to the host platform.

Definition at line 18 of file platform_message_handler.h.

Constructor & Destructor Documentation

◆ ~PlatformMessageHandler()

virtual flutter::PlatformMessageHandler::~PlatformMessageHandler ( )
virtualdefault

Member Function Documentation

◆ DoesHandlePlatformMessageOnPlatformThread()

virtual bool flutter::PlatformMessageHandler::DoesHandlePlatformMessageOnPlatformThread ( ) const
pure virtual

Returns true if the platform message will ALWAYS be dispatched to the platform thread.

Platforms that support Background Platform Channels will return false.

Implemented in flutter::PlatformViewEmbedder::EmbedderPlatformMessageHandler, flutter::PlatformMessageHandlerAndroid, and flutter::PlatformMessageHandlerIos.

◆ HandlePlatformMessage()

virtual void flutter::PlatformMessageHandler::HandlePlatformMessage ( std::unique_ptr< PlatformMessage message)
pure virtual

Ultimately sends the PlatformMessage to the host platform. This method is invoked on the ui thread.

Implemented in flutter::PlatformViewEmbedder::EmbedderPlatformMessageHandler, flutter::PlatformMessageHandlerAndroid, and flutter::PlatformMessageHandlerIos.

◆ InvokePlatformMessageEmptyResponseCallback()

virtual void flutter::PlatformMessageHandler::InvokePlatformMessageEmptyResponseCallback ( int  response_id)
pure virtual

Performs the return procedure for an associated call to HandlePlatformMessage where there is no return value. This method should be thread-safe and able to be invoked on any thread.

Implemented in flutter::PlatformViewEmbedder::EmbedderPlatformMessageHandler, flutter::PlatformMessageHandlerAndroid, and flutter::PlatformMessageHandlerIos.

◆ InvokePlatformMessageResponseCallback()

virtual void flutter::PlatformMessageHandler::InvokePlatformMessageResponseCallback ( int  response_id,
std::unique_ptr< fml::Mapping mapping 
)
pure virtual

Performs the return procedure for an associated call to HandlePlatformMessage. This method should be thread-safe and able to be invoked on any thread.

Implemented in flutter::PlatformViewEmbedder::EmbedderPlatformMessageHandler, flutter::PlatformMessageHandlerAndroid, and flutter::PlatformMessageHandlerIos.


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