Flutter Engine
flutter::PlatformMessageResponseDarwin Class Reference

#include <platform_message_response_darwin.h>

Inheritance diagram for flutter::PlatformMessageResponseDarwin:
flutter::PlatformMessageResponse fml::RefCountedThreadSafe< PlatformMessageResponse > fml::internal::RefCountedThreadSafeBase

Public Member Functions

void Complete (std::unique_ptr< fml::Mapping > data) override
 
void CompleteEmpty () override
 
- Public Member Functions inherited from flutter::PlatformMessageResponse
bool is_complete () const
 
- Public Member Functions inherited from fml::RefCountedThreadSafe< PlatformMessageResponse >
void Release () const
 
- Public Member Functions inherited from fml::internal::RefCountedThreadSafeBase
void AddRef () const
 
bool HasOneRef () const
 
void AssertHasOneRef () const
 

Additional Inherited Members

- Protected Member Functions inherited from flutter::PlatformMessageResponse
 PlatformMessageResponse ()
 
virtual ~PlatformMessageResponse ()
 
- Protected Member Functions inherited from fml::RefCountedThreadSafe< PlatformMessageResponse >
 RefCountedThreadSafe ()
 
 ~RefCountedThreadSafe ()
 
- Protected Member Functions inherited from fml::internal::RefCountedThreadSafeBase
 RefCountedThreadSafeBase ()
 
 ~RefCountedThreadSafeBase ()
 
bool Release () const
 
void Adopt ()
 
- Protected Attributes inherited from flutter::PlatformMessageResponse
bool is_complete_ = false
 

Detailed Description

Definition at line 21 of file platform_message_response_darwin.h.

Member Function Documentation

◆ Complete()

void flutter::PlatformMessageResponseDarwin::Complete ( std::unique_ptr< fml::Mapping data)
overridevirtual

Implements flutter::PlatformMessageResponse.

Definition at line 17 of file platform_message_response_darwin.mm.

References flutter::GetNSDataFromMapping(), fml::MakeCopyable(), and fml::TaskRunner::PostTask().

17  {
19  platform_task_runner_->PostTask(fml::MakeCopyable([self, data = std::move(data)]() mutable {
20  self->callback_.get()(GetNSDataFromMapping(std::move(data)));
21  }));
22 }
virtual void PostTask(const fml::closure &task)
Definition: task_runner.cc:24
internal::CopyableLambda< T > MakeCopyable(T lambda)
Definition: make_copyable.h:57
NSData * GetNSDataFromMapping(std::unique_ptr< fml::Mapping > mapping)

◆ CompleteEmpty()

void flutter::PlatformMessageResponseDarwin::CompleteEmpty ( )
overridevirtual

Implements flutter::PlatformMessageResponse.

Definition at line 24 of file platform_message_response_darwin.mm.

References fml::MakeCopyable(), and fml::TaskRunner::PostTask().

24  {
26  platform_task_runner_->PostTask(
27  fml::MakeCopyable([self]() mutable { self->callback_.get()(nil); }));
28 }
virtual void PostTask(const fml::closure &task)
Definition: task_runner.cc:24
internal::CopyableLambda< T > MakeCopyable(T lambda)
Definition: make_copyable.h:57

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