Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Side by Side Diff: Source/core/inspector/InspectorApplicationCacheAgent.h

Issue 1092123004: DevTools: remove dependency of most agents on InspectorPageAgent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: further cuts on InspectorPageAgent inter-agents API Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 25 matching lines...) Expand all
36 class LocalFrame; 36 class LocalFrame;
37 class InspectorFrontend; 37 class InspectorFrontend;
38 class InspectorPageAgent; 38 class InspectorPageAgent;
39 39
40 typedef String ErrorString; 40 typedef String ErrorString;
41 41
42 class InspectorApplicationCacheAgent final : public InspectorBaseAgent<Inspector ApplicationCacheAgent, InspectorFrontend::ApplicationCache>, public InspectorBac kendDispatcher::ApplicationCacheCommandHandler { 42 class InspectorApplicationCacheAgent final : public InspectorBaseAgent<Inspector ApplicationCacheAgent, InspectorFrontend::ApplicationCache>, public InspectorBac kendDispatcher::ApplicationCacheCommandHandler {
43 WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); 43 WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent);
44 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorApplicationCacheAgent); 44 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorApplicationCacheAgent);
45 public: 45 public:
46 static PassOwnPtrWillBeRawPtr<InspectorApplicationCacheAgent> create(Inspect orPageAgent* pageAgent) 46 static PassOwnPtrWillBeRawPtr<InspectorApplicationCacheAgent> create(LocalFr ame* inspectedFrame)
47 { 47 {
48 return adoptPtrWillBeNoop(new InspectorApplicationCacheAgent(pageAgent)) ; 48 return adoptPtrWillBeNoop(new InspectorApplicationCacheAgent(inspectedFr ame));
49 } 49 }
50 virtual ~InspectorApplicationCacheAgent() { } 50 virtual ~InspectorApplicationCacheAgent() { }
51 DECLARE_VIRTUAL_TRACE(); 51 DECLARE_VIRTUAL_TRACE();
52 52
53 // InspectorBaseAgent 53 // InspectorBaseAgent
54 void restore() override; 54 void restore() override;
55 void disable(ErrorString*) override; 55 void disable(ErrorString*) override;
56 56
57 // InspectorInstrumentation API 57 // InspectorInstrumentation API
58 void updateApplicationCacheStatus(LocalFrame*); 58 void updateApplicationCacheStatus(LocalFrame*);
59 void networkStateChanged(LocalFrame*, bool online); 59 void networkStateChanged(LocalFrame*, bool online);
60 60
61 // ApplicationCache API for InspectorFrontend 61 // ApplicationCache API for InspectorFrontend
62 virtual void enable(ErrorString*) override; 62 virtual void enable(ErrorString*) override;
63 virtual void getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array< TypeBuilder::ApplicationCache::FrameWithManifest> >& result) override; 63 virtual void getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array< TypeBuilder::ApplicationCache::FrameWithManifest> >& result) override;
64 virtual void getManifestForFrame(ErrorString*, const String& frameId, String * manifestURL) override; 64 virtual void getManifestForFrame(ErrorString*, const String& frameId, String * manifestURL) override;
65 virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId , RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&) override; 65 virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId , RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&) override;
66 66
67 private: 67 private:
68 InspectorApplicationCacheAgent(InspectorPageAgent*); 68 explicit InspectorApplicationCacheAgent(LocalFrame*);
69 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForAp plicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationC acheHost::CacheInfo&); 69 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&); 70 PassRefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCach eResource> > buildArrayForApplicationCacheResources(const ApplicationCacheHost:: ResourceInfoList&);
71 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObj ectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&); 71 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObj ectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&);
72 72
73 DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId); 73 DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId);
74 74
75 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; 75 RawPtrWillBeMember<LocalFrame> m_inspectedFrame;
76 }; 76 };
77 77
78 } // namespace blink 78 } // namespace blink
79 79
80 #endif // InspectorApplicationCacheAgent_h 80 #endif // InspectorApplicationCacheAgent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698