void InspectorApplicationCacheAgent::getApplicationCaches(ErrorString*, RefPtr<InspectorObject>* applicationCaches) { DocumentLoader* documentLoader = m_inspectedPage->mainFrame()->loader()->documentLoader(); if (!documentLoader) return; ApplicationCacheHost* host = documentLoader->applicationCacheHost(); ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo(); ApplicationCacheHost::ResourceInfoList resources; host->fillResourceList(&resources); *applicationCaches = buildObjectForApplicationCache(resources, info); }
void InspectorApplicationCacheAgent::getApplicationCaches(RefPtr<InspectorValue>* applicationCaches) { DocumentLoader* documentLoader = m_inspectorController->inspectedPage()->mainFrame()->loader()->documentLoader(); if (documentLoader) { ApplicationCacheHost* host = documentLoader->applicationCacheHost(); ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo(); ApplicationCacheHost::ResourceInfoList resources; host->fillResourceList(&resources); *applicationCaches = buildObjectForApplicationCache(resources, info); } }
void InspectorApplicationCacheAgent::getApplicationCacheForFrame(ErrorString* errorString, const String& frameId, RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>& applicationCache) { DocumentLoader* documentLoader = assertFrameWithDocumentLoader(errorString, frameId); if (!documentLoader) return; ApplicationCacheHost* host = documentLoader->applicationCacheHost(); ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo(); ApplicationCacheHost::ResourceInfoList resources; host->fillResourceList(&resources); applicationCache = buildObjectForApplicationCache(resources, info); }
Response InspectorApplicationCacheAgent::getApplicationCacheForFrame( const String& frameId, std::unique_ptr<protocol::ApplicationCache::ApplicationCache>* applicationCache) { DocumentLoader* documentLoader = nullptr; Response response = assertFrameWithDocumentLoader(frameId, documentLoader); if (!response.isSuccess()) return response; ApplicationCacheHost* host = documentLoader->applicationCacheHost(); ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo(); ApplicationCacheHost::ResourceInfoList resources; host->fillResourceList(&resources); *applicationCache = buildObjectForApplicationCache(resources, info); return Response::OK(); }