diff options
Diffstat (limited to 'Source/WebCore/inspector/InspectorApplicationCacheAgent.h')
-rw-r--r-- | Source/WebCore/inspector/InspectorApplicationCacheAgent.h | 50 |
1 files changed, 21 insertions, 29 deletions
diff --git a/Source/WebCore/inspector/InspectorApplicationCacheAgent.h b/Source/WebCore/inspector/InspectorApplicationCacheAgent.h index 52d8e0ede..48752efa0 100644 --- a/Source/WebCore/inspector/InspectorApplicationCacheAgent.h +++ b/Source/WebCore/inspector/InspectorApplicationCacheAgent.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010, 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,20 +22,16 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef InspectorApplicationCacheAgent_h -#define InspectorApplicationCacheAgent_h - -#if ENABLE(INSPECTOR) +#pragma once #include "ApplicationCacheHost.h" #include "InspectorWebAgentBase.h" -#include "InspectorWebBackendDispatchers.h" -#include "InspectorWebFrontendDispatchers.h" +#include <inspector/InspectorBackendDispatchers.h> +#include <inspector/InspectorFrontendDispatchers.h> #include <wtf/Noncopyable.h> -#include <wtf/PassOwnPtr.h> namespace Inspector { -class InspectorApplicationCacheFrontendDispatcher; +class ApplicationCacheFrontendDispatcher; class InspectorObject; class InspectorValue; } @@ -44,42 +40,38 @@ namespace WebCore { class Frame; class InspectorPageAgent; -class InstrumentingAgents; class Page; -class ResourceResponse; typedef String ErrorString; -class InspectorApplicationCacheAgent : public InspectorAgentBase, public Inspector::InspectorApplicationCacheBackendDispatcherHandler { +class InspectorApplicationCacheAgent final : public InspectorAgentBase, public Inspector::ApplicationCacheBackendDispatcherHandler { WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); WTF_MAKE_FAST_ALLOCATED; public: - InspectorApplicationCacheAgent(InstrumentingAgents*, InspectorPageAgent*); - ~InspectorApplicationCacheAgent() { } + InspectorApplicationCacheAgent(WebAgentContext&, InspectorPageAgent*); + virtual ~InspectorApplicationCacheAgent() { } - virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override; - virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override; + void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override; + void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override; void updateApplicationCacheStatus(Frame*); void networkStateChanged(); - virtual void enable(ErrorString*) override; - virtual void getFramesWithManifests(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::ApplicationCache::FrameWithManifest>>& result) override; - virtual void getManifestForFrame(ErrorString*, const String& frameId, String* manifestURL) override; - virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId, RefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCache>&) override; + void enable(ErrorString&) override; + void getFramesWithManifests(ErrorString&, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::ApplicationCache::FrameWithManifest>>& result) override; + void getManifestForFrame(ErrorString&, const String& frameId, String* manifestURL) override; + void getApplicationCacheForFrame(ErrorString&, const String& frameId, RefPtr<Inspector::Protocol::ApplicationCache::ApplicationCache>&) override; private: - PassRefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForApplicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationCacheHost::CacheInfo&); - PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource>> buildArrayForApplicationCacheResources(const ApplicationCacheHost::ResourceInfoList&); - PassRefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&); + Ref<Inspector::Protocol::ApplicationCache::ApplicationCache> buildObjectForApplicationCache(const Vector<ApplicationCacheHost::ResourceInfo>&, const ApplicationCacheHost::CacheInfo&); + Ref<Inspector::Protocol::Array<Inspector::Protocol::ApplicationCache::ApplicationCacheResource>> buildArrayForApplicationCacheResources(const Vector<ApplicationCacheHost::ResourceInfo>&); + Ref<Inspector::Protocol::ApplicationCache::ApplicationCacheResource> buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&); - DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId); + DocumentLoader* assertFrameWithDocumentLoader(ErrorString&, const String& frameId); - InspectorPageAgent* m_pageAgent; - std::unique_ptr<Inspector::InspectorApplicationCacheFrontendDispatcher> m_frontendDispatcher; - RefPtr<Inspector::InspectorApplicationCacheBackendDispatcher> m_backendDispatcher; + std::unique_ptr<Inspector::ApplicationCacheFrontendDispatcher> m_frontendDispatcher; + RefPtr<Inspector::ApplicationCacheBackendDispatcher> m_backendDispatcher; + InspectorPageAgent* m_pageAgent { nullptr }; }; } // namespace WebCore -#endif // ENABLE(INSPECTOR) -#endif // InspectorApplicationCacheAgent_h |