Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implemented full destroy sequence in ASYNC mode
  • Loading branch information
tmeshkova committed Oct 19, 2014
1 parent 8b006b2 commit 491497b
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -38,6 +38,17 @@ class MyListener : public EmbedLiteAppListener, public EmbedLiteViewListener
}
virtual void ViewDestroyed() {
printf("OnViewDestroyed\n");
mApp->PostTask(&MyListener::DoDestroyApp, this, 100);
}
static void DoDestroyApp(void* aData) {
MyListener* self = static_cast<MyListener*>(aData);
printf("DoDestroyApp\n");
self->mApp->Stop();
}
static void DoDestroyView(void* aData) {
MyListener* self = static_cast<MyListener*>(aData);
printf("DoDestroyView\n");
self->mApp->DestroyView(self->mView);
}
virtual void OnLocationChanged(const char* aLocation, bool aCanGoBack, bool aCanGoForward) {
printf("OnLocationChanged: loc:%s, canBack:%i, canForw:%i\n", aLocation, aCanGoBack, aCanGoForward);
Expand All @@ -59,6 +70,7 @@ class MyListener : public EmbedLiteAppListener, public EmbedLiteViewListener
}
virtual void OnFirstPaint(int32_t aX, int32_t aY) {
printf("OnFirstPaint pos[%i,%i]\n", aX, aY);
mApp->PostTask(&MyListener::DoDestroyView, this, 100);
}
virtual void OnScrolledAreaChanged(unsigned int aWidth, unsigned int aHeight) {
printf("OnScrolledAreaChanged: sz[%u,%u]\n", aWidth, aHeight);
Expand Down

0 comments on commit 491497b

Please sign in to comment.