本文整理汇总了C++中EventQueue::enqueueEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ EventQueue::enqueueEvent方法的具体用法?C++ EventQueue::enqueueEvent怎么用?C++ EventQueue::enqueueEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventQueue
的用法示例。
在下文中一共展示了EventQueue::enqueueEvent方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: enqueueEvent
void IDBDatabase::enqueueEvent(PassRefPtr<Event> event)
{
ASSERT(scriptExecutionContext()->isDocument());
EventQueue* eventQueue = static_cast<Document*>(scriptExecutionContext())->eventQueue();
event->setTarget(this);
eventQueue->enqueueEvent(event.get());
m_enqueuedEvents.append(event);
}
示例2: enqueueEvent
void IDBDatabase::enqueueEvent(Event* event) {
DCHECK(!m_contextStopped);
DCHECK(getExecutionContext());
EventQueue* eventQueue = getExecutionContext()->getEventQueue();
event->setTarget(this);
eventQueue->enqueueEvent(event);
m_enqueuedEvents.append(event);
}
示例3: enqueueEvent
void IDBDatabase::enqueueEvent(PassRefPtr<Event> event)
{
ASSERT(!m_contextStopped);
ASSERT(scriptExecutionContext());
EventQueue* eventQueue = scriptExecutionContext()->eventQueue();
event->setTarget(this);
eventQueue->enqueueEvent(event.get());
m_enqueuedEvents.append(event);
}
示例4: enqueueEvent
void IDBTransaction::enqueueEvent(PassRefPtrWillBeRawPtr<Event> event)
{
ASSERT_WITH_MESSAGE(m_state != Finished, "A finished transaction tried to enqueue an event of type %s.", event->type().utf8().data());
if (m_contextStopped || !executionContext())
return;
EventQueue* eventQueue = executionContext()->eventQueue();
event->setTarget(this);
eventQueue->enqueueEvent(event);
}
示例5: enqueueEvent
void IDBTransaction::enqueueEvent(Event* event) {
DCHECK_NE(m_state, Finished)
<< "A finished transaction tried to enqueue an event of type "
<< event->type() << ".";
if (!getExecutionContext())
return;
EventQueue* eventQueue = getExecutionContext()->getEventQueue();
event->setTarget(this);
eventQueue->enqueueEvent(event);
}
示例6: enqueueEvent
void IDBTransaction::enqueueEvent(PassRefPtr<Event> event)
{
ASSERT(!m_finished);
if (!scriptExecutionContext())
return;
/// M: scriptExecutionContext can be 'document' or 'worker' context
EventQueue* eventQueue = scriptExecutionContext()->eventQueue();
event->setTarget(this);
eventQueue->enqueueEvent(event);
}
示例7: enqueueEvent
void IDBRequest::enqueueEvent(PassRefPtr<Event> event)
{
ASSERT(!m_finished);
ASSERT(m_readyState < DONE);
if (!scriptExecutionContext())
return;
ASSERT(scriptExecutionContext()->isDocument());
EventQueue* eventQueue = static_cast<Document*>(scriptExecutionContext())->eventQueue();
event->setTarget(this);
eventQueue->enqueueEvent(event.get());
m_enqueuedEvents.append(event);
}
示例8: enqueueEvent
void IDBRequest::enqueueEvent(PassRefPtr<Event> event)
{
ASSERT(m_readyState == PENDING || m_readyState == DONE);
if (m_contextStopped || !scriptExecutionContext())
return;
ASSERT_WITH_MESSAGE(m_readyState == PENDING || m_didFireUpgradeNeededEvent, "When queueing event %s, m_readyState was %d", event->type().string().utf8().data(), m_readyState);
EventQueue* eventQueue = scriptExecutionContext()->eventQueue();
event->setTarget(this);
if (eventQueue->enqueueEvent(event.get()))
m_enqueuedEvents.append(event);
}
示例9: enqueueEvent
void IDBRequest::enqueueEvent(PassRefPtr<Event> event)
{
ASSERT(m_readyState == PENDING || m_readyState == DONE);
if (m_contextStopped || !executionContext())
return;
ASSERT_WITH_MESSAGE(m_readyState == PENDING || m_didFireUpgradeNeededEvent, "When queueing event %s, m_readyState was %d", event->type().string().utf8().data(), m_readyState);
EventQueue* eventQueue = executionContext()->eventQueue();
event->setTarget(this);
// Keep track of enqueued events in case we need to abort prior to dispatch,
// in which case these must be cancelled. If the events not dispatched for
// other reasons they must be removed from this list via dequeueEvent().
if (eventQueue->enqueueEvent(event.get()))
m_enqueuedEvents.append(event);
}