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 23 matching lines...) Expand all Loading... | |
| 34 namespace WebCore { | 34 namespace WebCore { |
| 35 | 35 |
| 36 class LocalFrame; | 36 class LocalFrame; |
| 37 class InspectorFrontend; | 37 class InspectorFrontend; |
| 38 class InspectorPageAgent; | 38 class InspectorPageAgent; |
| 39 class InstrumentingAgents; | 39 class InstrumentingAgents; |
| 40 | 40 |
| 41 typedef String ErrorString; | 41 typedef String ErrorString; |
| 42 | 42 |
| 43 class InspectorApplicationCacheAgent FINAL : public InspectorBaseAgent<Inspector ApplicationCacheAgent>, public InspectorBackendDispatcher::ApplicationCacheComma ndHandler { | 43 class InspectorApplicationCacheAgent FINAL : public InspectorBaseAgent<Inspector ApplicationCacheAgent>, public InspectorBackendDispatcher::ApplicationCacheComma ndHandler { |
| 44 WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); WTF_MAKE_FAST_ALLOCATE D; | 44 WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); |
| 45 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | |
| 45 public: | 46 public: |
| 46 static PassOwnPtr<InspectorApplicationCacheAgent> create(InspectorPageAgent* pageAgent) | 47 static PassOwnPtrWillBeRawPtr<InspectorApplicationCacheAgent> create(Inspect orPageAgent* pageAgent) |
| 47 { | 48 { |
| 48 return adoptPtr(new InspectorApplicationCacheAgent(pageAgent)); | 49 return adoptPtrWillBeNoop(new InspectorApplicationCacheAgent(pageAgent)) ; |
| 49 } | 50 } |
| 50 virtual ~InspectorApplicationCacheAgent() { } | 51 virtual ~InspectorApplicationCacheAgent() { } |
| 52 virtual void trace(Visitor*) OVERRIDE; | |
| 51 | 53 |
| 52 // InspectorBaseAgent | 54 // InspectorBaseAgent |
| 53 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 55 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
| 54 virtual void clearFrontend() OVERRIDE; | 56 virtual void clearFrontend() OVERRIDE; |
| 55 virtual void restore() OVERRIDE; | 57 virtual void restore() OVERRIDE; |
| 56 | 58 |
| 57 // InspectorInstrumentation API | 59 // InspectorInstrumentation API |
| 58 void updateApplicationCacheStatus(LocalFrame*); | 60 void updateApplicationCacheStatus(LocalFrame*); |
| 59 void networkStateChanged(bool online); | 61 void networkStateChanged(bool online); |
| 60 | 62 |
| 61 // ApplicationCache API for InspectorFrontend | 63 // ApplicationCache API for InspectorFrontend |
| 62 virtual void enable(ErrorString*) OVERRIDE; | 64 virtual void enable(ErrorString*) OVERRIDE; |
| 63 virtual void getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array< TypeBuilder::ApplicationCache::FrameWithManifest> >& result) OVERRIDE; | 65 virtual void getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array< TypeBuilder::ApplicationCache::FrameWithManifest> >& result) OVERRIDE; |
| 64 virtual void getManifestForFrame(ErrorString*, const String& frameId, String * manifestURL) OVERRIDE; | 66 virtual void getManifestForFrame(ErrorString*, const String& frameId, String * manifestURL) OVERRIDE; |
| 65 virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId , RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&) OVERRIDE; | 67 virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId , RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&) OVERRIDE; |
| 66 | 68 |
| 67 private: | 69 private: |
| 68 InspectorApplicationCacheAgent(InspectorPageAgent*); | 70 InspectorApplicationCacheAgent(InspectorPageAgent*); |
| 69 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForAp plicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationC acheHost::CacheInfo&); | 71 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForAp plicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationC acheHost::CacheInfo&); |
| 70 PassRefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCach eResource> > buildArrayForApplicationCacheResources(const ApplicationCacheHost:: ResourceInfoList&); | 72 PassRefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCach eResource> > buildArrayForApplicationCacheResources(const ApplicationCacheHost:: ResourceInfoList&); |
| 71 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObj ectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&); | 73 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObj ectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&); |
| 72 | 74 |
| 73 DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId); | 75 DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId); |
| 74 | 76 |
| 75 InspectorPageAgent* m_pageAgent; | 77 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
| 76 InspectorFrontend::ApplicationCache* m_frontend; | 78 InspectorFrontend::ApplicationCache* m_frontend; |
|
haraken
2014/06/11 06:09:48
This raw pointer looks safe because m_frontend is
| |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 } // namespace WebCore | 81 } // namespace WebCore |
| 80 | 82 |
| 81 #endif // InspectorApplicationCacheAgent_h | 83 #endif // InspectorApplicationCacheAgent_h |
| OLD | NEW |