Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::GTestActivity Class Referencefinal

A native activity subclass an in implementation of flutter::NativeActivityMain that return it. More...

#include <gtest_activity.h>

Inheritance diagram for flutter::GTestActivity:
flutter::NativeActivity

Public Member Functions

 GTestActivity (ANativeActivity *activity)
 
 ~GTestActivity () override
 
 GTestActivity (const GTestActivity &)=delete
 
GTestActivityoperator= (const GTestActivity &)=delete
 
void OnNativeWindowCreated (ANativeWindow *window) override
 
- Public Member Functions inherited from flutter::NativeActivity
virtual ~NativeActivity ()
 
void Terminate ()
 Perform graceful termination of the activity. Will eventually lead to the other activity lifecycle callback on the way to termination. More...
 
virtual void OnStart ()
 
virtual void OnStop ()
 
virtual void OnPause ()
 
virtual void OnResume ()
 
virtual std::shared_ptr< fml::MappingOnSaveInstanceState ()
 
virtual void OnWindowFocusChanged (bool has_focus)
 
virtual void OnNativeWindowCreated (ANativeWindow *window)
 
virtual void OnNativeWindowResized (ANativeWindow *window)
 
virtual void OnNativeWindowRedrawNeeded (ANativeWindow *window)
 
virtual void OnNativeWindowDestroyed (ANativeWindow *window)
 
virtual void OnInputQueueCreated (AInputQueue *queue)
 
virtual void OnInputQueueDestroyed (AInputQueue *queue)
 
virtual void OnConfigurationChanged ()
 
virtual void OnLowMemory ()
 

Additional Inherited Members

- Protected Member Functions inherited from flutter::NativeActivity
 NativeActivity (ANativeActivity *activity)
 

Detailed Description

A native activity subclass an in implementation of flutter::NativeActivityMain that return it.

This class runs a Google Test harness on a background thread and redirects progress updates to logcat instead of STDOUT.

Definition at line 21 of file gtest_activity.h.

Constructor & Destructor Documentation

◆ GTestActivity() [1/2]

flutter::GTestActivity::GTestActivity ( ANativeActivity *  activity)
explicit

Definition at line 13 of file gtest_activity.cc.

14 : NativeActivity(activity) {}
NativeActivity(ANativeActivity *activity)

◆ ~GTestActivity()

flutter::GTestActivity::~GTestActivity ( )
overridedefault

◆ GTestActivity() [2/2]

flutter::GTestActivity::GTestActivity ( const GTestActivity )
delete

Member Function Documentation

◆ OnNativeWindowCreated()

void flutter::GTestActivity::OnNativeWindowCreated ( ANativeWindow window)
overridevirtual

Reimplemented from flutter::NativeActivity.

Definition at line 37 of file gtest_activity.cc.

37 {
38 auto handle = std::make_shared<impeller::android::NativeWindow>(window);
39 background_thread_.GetTaskRunner()->PostTask(
40 [handle]() { StartTestSuite(*handle); });
41}
virtual void PostTask(const fml::closure &task) override
Definition: task_runner.cc:24
fml::RefPtr< fml::TaskRunner > GetTaskRunner() const
Definition: thread.cc:164
GLFWwindow * window
Definition: main.cc:45
static void StartTestSuite(const impeller::android::NativeWindow &window)

◆ operator=()

GTestActivity & flutter::GTestActivity::operator= ( const GTestActivity )
delete

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