This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LifeCycleDelegateDialog extends Dialog { | |
interface LifeCycleDelegate { | |
default void onDismiss() {} | |
default void onResume() {} | |
default void onPause() {} | |
... | |
} | |
private LifeCycleDelegate mDelegate; | |
public void setDelegate(LifeCycleDelegate delegate) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef COROUTINE_H_ | |
#define COROUTINE_H_ | |
#include <memory> | |
#include "base/bind.h" | |
using Coroutine = std::function<void(void*, void*)>; | |
#define co_resume_with_data(coroutine, result_ref) \ | |
(*coroutine)(coroutine, result_ref) |