当前位置: 首页>>代码示例>>C++>>正文


C++ EventQueue::cancelEvent方法代码示例

本文整理汇总了C++中EventQueue::cancelEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ EventQueue::cancelEvent方法的具体用法?C++ EventQueue::cancelEvent怎么用?C++ EventQueue::cancelEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EventQueue的用法示例。


在下文中一共展示了EventQueue::cancelEvent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: abort

void IDBRequest::abort()
{
    ASSERT(!m_requestAborted);
    if (m_contextStopped || !scriptExecutionContext())
        return;
    ASSERT(m_readyState == PENDING || m_readyState == DONE);
    if (m_readyState == DONE)
        return;

    // Enqueued events may be the only reference to this object.
    RefPtr<IDBRequest> self(this);

    EventQueue* eventQueue = scriptExecutionContext()->eventQueue();
    for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
        bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get());
        ASSERT_UNUSED(removed, removed);
    }
    m_enqueuedEvents.clear();

    m_errorCode = 0;
    m_error.clear();
    m_errorMessage = String();
    m_result.clear();
    onError(IDBDatabaseError::create(IDBDatabaseException::IDB_ABORT_ERR, "The transaction was aborted, so the request cannot be fulfilled."));
    m_requestAborted = true;
}
开发者ID:yoavweiss,项目名称:RespImg-WebKit,代码行数:26,代码来源:IDBRequest.cpp

示例2: closeConnection

void IDBDatabase::closeConnection() {
  DCHECK(m_closePending);
  DCHECK(m_transactions.isEmpty());

  if (m_backend) {
    m_backend->close();
    m_backend.reset();
  }

  if (m_databaseCallbacks)
    m_databaseCallbacks->detachWebCallbacks();

  if (m_contextStopped || !getExecutionContext())
    return;

  EventQueue* eventQueue = getExecutionContext()->getEventQueue();
  // Remove any pending versionchange events scheduled to fire on this
  // connection. They would have been scheduled by the backend when another
  // connection attempted an upgrade, but the frontend connection is being
  // closed before they could fire.
  for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
    bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get());
    DCHECK(removed);
  }
}
开发者ID:ollie314,项目名称:chromium,代码行数:25,代码来源:IDBDatabase.cpp

示例3: close

void IDBDatabase::close()
{
    if (m_noNewTransactions)
        return;

    ASSERT(scriptExecutionContext()->isDocument());
    EventQueue* eventQueue = static_cast<Document*>(scriptExecutionContext())->eventQueue();
    // Remove any pending versionchange events scheduled to fire on this
    // connection. They would have been scheduled by the backend when another
    // connection called setVersion, but the frontend connection is being
    // closed before they could fire.
    for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
        bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get());
        ASSERT_UNUSED(removed, removed);
    }

    m_noNewTransactions = true;
    m_backend->close(m_databaseCallbacks);
}
开发者ID:vizcount,项目名称:work,代码行数:19,代码来源:IDBDatabase.cpp

示例4: closeConnection

void IDBDatabase::closeConnection()
{
    ASSERT(m_closePending);
    ASSERT(m_transactions.isEmpty());

    m_backend->close(m_databaseCallbacks);

    if (m_contextStopped || !scriptExecutionContext())
        return;

    EventQueue* eventQueue = scriptExecutionContext()->eventQueue();
    // Remove any pending versionchange events scheduled to fire on this
    // connection. They would have been scheduled by the backend when another
    // connection called setVersion, but the frontend connection is being
    // closed before they could fire.
    for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
        bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get());
        ASSERT_UNUSED(removed, removed);
    }
}
开发者ID:KnightSwarm,项目名称:WebKitTi,代码行数:20,代码来源:IDBDatabase.cpp

示例5: abort

void IDBRequest::abort()
{
    ASSERT(!m_requestAborted);
    if (m_contextStopped || !executionContext())
        return;
    ASSERT(m_readyState == PENDING || m_readyState == DONE);
    if (m_readyState == DONE)
        return;

    EventQueue* eventQueue = executionContext()->eventQueue();
    for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
        bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get());
        ASSERT_UNUSED(removed, removed);
    }
    m_enqueuedEvents.clear();

    m_error.clear();
    m_result.clear();
    onError(DOMError::create(AbortError, "The transaction was aborted, so the request cannot be fulfilled."));
    m_requestAborted = true;
}
开发者ID:335969568,项目名称:Blink-1,代码行数:21,代码来源:IDBRequest.cpp

示例6: abort

void IDBRequest::abort()
{
    if (m_readyState != LOADING) {
        ASSERT(m_readyState == DONE);
        return;
    }
    // FIXME: Remove isDocument check when
    // https://bugs.webkit.org/show_bug.cgi?id=57789 is resolved.
    if (!scriptExecutionContext() || !scriptExecutionContext()->isDocument())
        return;

    EventQueue* eventQueue = static_cast<Document*>(scriptExecutionContext())->eventQueue();
    for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
        bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get());
        ASSERT_UNUSED(removed, removed);
    }
    m_enqueuedEvents.clear();

    m_errorCode = 0;
    m_errorMessage = String();
    m_result.clear();
    onError(IDBDatabaseError::create(IDBDatabaseException::ABORT_ERR, "The transaction was aborted, so the request cannot be fulfilled."));
}
开发者ID:1833183060,项目名称:wke,代码行数:23,代码来源:IDBRequest.cpp


注:本文中的EventQueue::cancelEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。