Exemple #1
0
void CachedResource::cancelLoad()
{
    if (!isLoading() && !stillNeedsLoad())
        return;

    setStatus(LoadError);
    setLoading(false);
    checkNotify();
}
Exemple #2
0
void CachedResource::checkNotify()
{
    if (isLoading() || stillNeedsLoad())
        return;

    CachedResourceClientWalker<CachedResourceClient> walker(m_clients);
    while (CachedResourceClient* client = walker.next())
        client->notifyFinished(*this);
}
void Resource::didAddClient(ResourceClient* c)
{
    if (!isLoading() && !stillNeedsLoad()) {
        c->notifyFinished(this);
        if (m_clients.contains(c)) {
            m_finishedClients.add(c);
            m_clients.remove(c);
        }
    }
}
Exemple #4
0
void CachedResource::didAddClient(CachedResourceClient& client)
{
    if (m_decodedDataDeletionTimer.isActive())
        m_decodedDataDeletionTimer.stop();

    if (m_clientsAwaitingCallback.remove(&client))
        m_clients.add(&client);
    if (!isLoading() && !stillNeedsLoad())
        client.notifyFinished(*this);
}
Exemple #5
0
void CachedResource::didAddClient(CachedResourceClient* c)
{
    if (m_decodedDataDeletionTimer.isActive())
        m_decodedDataDeletionTimer.stop();

    if (m_clientsAwaitingCallback.contains(c)) {
        m_clients.add(c);
        m_clientsAwaitingCallback.remove(c);
    }
    if (!isLoading() && !stillNeedsLoad())
        c->notifyFinished(this);
}