7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_message_loop.h"
17 template <>
const char* interface_name<PPB_MessageLoop>() {
18 return PPB_MESSAGELOOP_INTERFACE_1_0;
27 if (has_interface<PPB_MessageLoop>()) {
43 if (!has_interface<PPB_MessageLoop>())
51 if (!has_interface<PPB_MessageLoop>())
54 get_interface<PPB_MessageLoop>()->
GetCurrent());
58 if (!has_interface<PPB_MessageLoop>())
59 return PP_ERROR_NOINTERFACE;
65 if (!has_interface<PPB_MessageLoop>())
66 return PP_ERROR_NOINTERFACE;
72 if (!has_interface<PPB_MessageLoop>())
73 return PP_ERROR_NOINTERFACE;
74 return get_interface<PPB_MessageLoop>()->
PostWork(
81 if (!has_interface<PPB_MessageLoop>())
82 return PP_ERROR_NOINTERFACE;
83 return get_interface<PPB_MessageLoop>()->
PostQuit(
void PassRefFromConstructor(PP_Resource resource)
int32_t PostWork(const CompletionCallback &callback, int64_t delay_ms=0)
static MessageLoop GetForMainThread()
MessageLoop()
Creates an is_null() MessageLoop resource.
const PP_CompletionCallback & pp_completion_callback() const
int32_t AttachToCurrentThread()
static MessageLoop GetCurrent()
PP_Resource pp_resource() const
int32_t PostQuit(bool should_destroy)
PP_Instance pp_instance() const
A reference counted module resource.