diff options
Diffstat (limited to 'Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp')
-rw-r--r-- | Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp b/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp index 1cca6fe..b38bb83 100644 --- a/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp +++ b/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp @@ -32,7 +32,7 @@ #include "DocumentLoader.h" #include "Frame.h" #include "FrameLoader.h" -#include "InspectorController.h" +#include "InspectorAgent.h" #include "InspectorFrontend.h" #include "InspectorValues.h" #include "NetworkStateNotifier.h" @@ -41,12 +41,17 @@ namespace WebCore { -InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(InspectorController* inspectorController, InspectorFrontend* frontend) - : m_inspectorController(inspectorController) +InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(DocumentLoader* documentLoader, InspectorFrontend* frontend) + : m_documentLoader(documentLoader) , m_frontend(frontend) { } +void InspectorApplicationCacheAgent::didCommitLoad(DocumentLoader* documentLoader) +{ + m_documentLoader = documentLoader; +} + void InspectorApplicationCacheAgent::updateApplicationCacheStatus(Frame* frame) { ApplicationCacheHost::Status status = frame->loader()->documentLoader()->applicationCacheHost()->status(); @@ -61,9 +66,8 @@ void InspectorApplicationCacheAgent::networkStateChanged() void InspectorApplicationCacheAgent::getApplicationCaches(RefPtr<InspectorValue>* applicationCaches) { - DocumentLoader* documentLoader = m_inspectorController->inspectedPage()->mainFrame()->loader()->documentLoader(); - if (documentLoader) { - ApplicationCacheHost* host = documentLoader->applicationCacheHost(); + if (m_documentLoader) { + ApplicationCacheHost* host = m_documentLoader->applicationCacheHost(); ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo(); ApplicationCacheHost::ResourceInfoList resources; |