InspectorApplicationCacheAgent.h [plain text]
#ifndef InspectorApplicationCacheAgent_h
#define InspectorApplicationCacheAgent_h
#if ENABLE(INSPECTOR) && ENABLE(OFFLINE_WEB_APPLICATIONS)
#include "ApplicationCacheHost.h"
#include "InspectorFrontend.h"
#include <wtf/Noncopyable.h>
#include <wtf/PassRefPtr.h>
namespace WebCore {
class Frame;
class InspectorArray;
class InspectorAgent;
class InspectorFrontend;
class InspectorObject;
class InspectorValue;
class InstrumentingAgents;
class Page;
class ResourceResponse;
typedef String ErrorString;
class InspectorApplicationCacheAgent {
WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); WTF_MAKE_FAST_ALLOCATED;
public:
InspectorApplicationCacheAgent(InstrumentingAgents*, Page*);
~InspectorApplicationCacheAgent() { }
void setFrontend(InspectorFrontend*);
void clearFrontend();
void updateApplicationCacheStatus(Frame*);
void networkStateChanged();
void getApplicationCaches(ErrorString*, RefPtr<InspectorObject>* applicationCaches);
private:
PassRefPtr<InspectorObject> buildObjectForApplicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationCacheHost::CacheInfo&);
PassRefPtr<InspectorArray> buildArrayForApplicationCacheResources(const ApplicationCacheHost::ResourceInfoList&);
PassRefPtr<InspectorObject> buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&);
InstrumentingAgents* m_instrumentingAgents;
Page* m_inspectedPage;
InspectorFrontend::ApplicationCache* m_frontend;
};
}
#endif // ENABLE(INSPECTOR) && ENABLE(OFFLINE_WEB_APPLICATIONS)
#endif // InspectorApplicationCacheAgent_h