Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 #include <wtf/Noncopyable.h> | 32 #include <wtf/Noncopyable.h> |
| 33 #include <wtf/PassOwnPtr.h> | 33 #include <wtf/PassOwnPtr.h> |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 class Frame; | 37 class Frame; |
| 38 class InspectorArray; | 38 class InspectorArray; |
| 39 class InspectorFrontend; | 39 class InspectorFrontend; |
| 40 class InspectorObject; | 40 class InspectorObject; |
| 41 class InspectorPageAgent; | 41 class InspectorPageAgent; |
| 42 class InspectorPageController; | |
| 42 class InspectorValue; | 43 class InspectorValue; |
| 43 class InspectorState; | 44 class InspectorState; |
| 44 class InstrumentingAgents; | 45 class InstrumentingAgents; |
| 45 class Page; | 46 class Page; |
| 46 class ResourceResponse; | 47 class ResourceResponse; |
| 47 | 48 |
| 48 typedef String ErrorString; | 49 typedef String ErrorString; |
| 49 | 50 |
| 50 class InspectorApplicationCacheAgent : public InspectorBaseAgent<InspectorApplic ationCacheAgent>, public InspectorBackendDispatcher::ApplicationCacheCommandHand ler { | 51 class InspectorApplicationCacheAgent : public InspectorBaseAgent, public Inspect orBackendDispatcher::ApplicationCacheCommandHandler { |
| 51 WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); WTF_MAKE_FAST_ALLOCATE D; | 52 WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); WTF_MAKE_FAST_ALLOCATE D; |
| 52 public: | 53 public: |
| 53 static PassOwnPtr<InspectorApplicationCacheAgent> create(InstrumentingAgents * instrumentingAgents, InspectorCompositeState* state, InspectorPageAgent* pageA gent) | 54 static PassRefPtr<InspectorApplicationCacheAgent> create(InstrumentingAgents *, InspectorState*, PassRefPtr<InspectorPageAgent>); |
| 54 { | 55 ~InspectorApplicationCacheAgent(); |
|
pfeldman
2013/06/18 15:36:06
virtual
Vladislav Kaznacheev
2013/06/19 12:58:43
Done.
| |
| 55 return adoptPtr(new InspectorApplicationCacheAgent(instrumentingAgents, state, pageAgent)); | |
| 56 } | |
| 57 ~InspectorApplicationCacheAgent() { } | |
| 58 | 56 |
| 59 // InspectorBaseAgent | 57 // InspectorBaseAgent |
| 60 virtual void setFrontend(InspectorFrontend*); | 58 virtual void setFrontend(InspectorFrontend*); |
| 61 virtual void clearFrontend(); | 59 virtual void clearFrontend(); |
| 62 virtual void restore(); | 60 virtual void restore(); |
| 63 | 61 |
| 64 // InspectorInstrumentation API | 62 // InspectorInstrumentation API |
| 65 void updateApplicationCacheStatus(Frame*); | 63 void updateApplicationCacheStatus(Frame*); |
| 66 void networkStateChanged(); | 64 void networkStateChanged(); |
| 67 | 65 |
| 68 // ApplicationCache API for InspectorFrontend | 66 // ApplicationCache API for InspectorFrontend |
| 69 virtual void enable(ErrorString*); | 67 virtual void enable(ErrorString*); |
| 70 virtual void getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array< TypeBuilder::ApplicationCache::FrameWithManifest> >& result); | 68 virtual void getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array< TypeBuilder::ApplicationCache::FrameWithManifest> >& result); |
| 71 virtual void getManifestForFrame(ErrorString*, const String& frameId, String * manifestURL); | 69 virtual void getManifestForFrame(ErrorString*, const String& frameId, String * manifestURL); |
| 72 virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId , RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&); | 70 virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId , RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&); |
| 73 | 71 |
| 74 private: | 72 private: |
| 75 InspectorApplicationCacheAgent(InstrumentingAgents*, InspectorCompositeState *, InspectorPageAgent*); | 73 InspectorApplicationCacheAgent(InstrumentingAgents*, InspectorState*, PassRe fPtr<InspectorPageAgent>); |
| 76 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForAp plicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationC acheHost::CacheInfo&); | 74 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForAp plicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationC acheHost::CacheInfo&); |
| 77 PassRefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCach eResource> > buildArrayForApplicationCacheResources(const ApplicationCacheHost:: ResourceInfoList&); | 75 PassRefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCach eResource> > buildArrayForApplicationCacheResources(const ApplicationCacheHost:: ResourceInfoList&); |
| 78 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObj ectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&); | 76 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObj ectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&); |
| 79 | 77 |
| 80 DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId); | 78 DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId); |
| 81 | 79 |
| 82 InspectorPageAgent* m_pageAgent; | 80 RefPtr<InspectorPageAgent> m_pageAgent; |
| 83 InspectorFrontend::ApplicationCache* m_frontend; | 81 InspectorFrontend::ApplicationCache* m_frontend; |
| 84 }; | 82 }; |
| 85 | 83 |
| 84 class InspectorApplicationCacheController: public InspectorBaseController<Inspec torApplicationCacheController, InspectorApplicationCacheAgent> { | |
|
pfeldman
2013/06/18 15:36:06
:
Vladislav Kaznacheev
2013/06/19 12:58:43
Done.
| |
| 85 public: | |
| 86 | |
| 87 static PassOwnPtr<InspectorApplicationCacheController> create(InstrumentingA gents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPa geController* pageController) | |
| 88 { | |
| 89 return adoptPtr(new InspectorApplicationCacheController(instrumentingAge nts, compositeState, pageController)); | |
| 90 } | |
| 91 | |
| 92 protected: | |
| 93 InspectorApplicationCacheController(InstrumentingAgents*, InspectorComposite State*, InspectorPageController*); | |
| 94 }; | |
| 95 | |
| 86 } // namespace WebCore | 96 } // namespace WebCore |
| 87 | 97 |
| 88 #endif // InspectorApplicationCacheAgent_h | 98 #endif // InspectorApplicationCacheAgent_h |
| OLD | NEW |