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

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: fixed debug build Created 5 years, 7 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 17 matching lines...) Expand all
28 #include "core/InspectorFrontend.h" 28 #include "core/InspectorFrontend.h"
29 #include "core/inspector/InspectorBaseAgent.h" 29 #include "core/inspector/InspectorBaseAgent.h"
30 #include "core/loader/appcache/ApplicationCacheHost.h" 30 #include "core/loader/appcache/ApplicationCacheHost.h"
31 #include "wtf/Noncopyable.h" 31 #include "wtf/Noncopyable.h"
32 #include "wtf/PassOwnPtr.h" 32 #include "wtf/PassOwnPtr.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class LocalFrame; 36 class LocalFrame;
37 class InspectorFrontend; 37 class InspectorFrontend;
38 class InspectorPageAgent;
39 38
40 typedef String ErrorString; 39 typedef String ErrorString;
41 40
42 class InspectorApplicationCacheAgent final : public InspectorBaseAgent<Inspector ApplicationCacheAgent, InspectorFrontend::ApplicationCache>, public InspectorBac kendDispatcher::ApplicationCacheCommandHandler { 41 class InspectorApplicationCacheAgent final : public InspectorBaseAgent<Inspector ApplicationCacheAgent, InspectorFrontend::ApplicationCache>, public InspectorBac kendDispatcher::ApplicationCacheCommandHandler {
43 WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); 42 WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent);
44 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorApplicationCacheAgent); 43 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorApplicationCacheAgent);
45 public: 44 public:
46 static PassOwnPtrWillBeRawPtr<InspectorApplicationCacheAgent> create(Inspect orPageAgent* pageAgent) 45 static PassOwnPtrWillBeRawPtr<InspectorApplicationCacheAgent> create(LocalFr ame* inspectedFrame)
47 { 46 {
48 return adoptPtrWillBeNoop(new InspectorApplicationCacheAgent(pageAgent)) ; 47 return adoptPtrWillBeNoop(new InspectorApplicationCacheAgent(inspectedFr ame));
49 } 48 }
50 virtual ~InspectorApplicationCacheAgent() { } 49 virtual ~InspectorApplicationCacheAgent() { }
51 DECLARE_VIRTUAL_TRACE(); 50 DECLARE_VIRTUAL_TRACE();
52 51
53 // InspectorBaseAgent 52 // InspectorBaseAgent
54 void restore() override; 53 void restore() override;
55 void disable(ErrorString*) override; 54 void disable(ErrorString*) override;
56 55
57 // InspectorInstrumentation API 56 // InspectorInstrumentation API
58 void updateApplicationCacheStatus(LocalFrame*); 57 void updateApplicationCacheStatus(LocalFrame*);
59 void networkStateChanged(LocalFrame*, bool online); 58 void networkStateChanged(LocalFrame*, bool online);
60 59
61 // ApplicationCache API for InspectorFrontend 60 // ApplicationCache API for InspectorFrontend
62 virtual void enable(ErrorString*) override; 61 virtual void enable(ErrorString*) override;
63 virtual void getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array< TypeBuilder::ApplicationCache::FrameWithManifest> >& result) override; 62 virtual void getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array< TypeBuilder::ApplicationCache::FrameWithManifest> >& result) override;
64 virtual void getManifestForFrame(ErrorString*, const String& frameId, String * manifestURL) override; 63 virtual void getManifestForFrame(ErrorString*, const String& frameId, String * manifestURL) override;
65 virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId , RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&) override; 64 virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId , RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&) override;
66 65
67 private: 66 private:
68 InspectorApplicationCacheAgent(InspectorPageAgent*); 67 explicit InspectorApplicationCacheAgent(LocalFrame*);
69 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForAp plicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationC acheHost::CacheInfo&); 68 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&); 69 PassRefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCach eResource> > buildArrayForApplicationCacheResources(const ApplicationCacheHost:: ResourceInfoList&);
71 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObj ectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&); 70 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObj ectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&);
72 71
73 DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId); 72 DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId);
74 73
75 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; 74 RawPtrWillBeMember<LocalFrame> m_inspectedFrame;
76 }; 75 };
77 76
78 } // namespace blink 77 } // namespace blink
79 78
80 #endif // InspectorApplicationCacheAgent_h 79 #endif // InspectorApplicationCacheAgent_h
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorAnimationAgent.cpp ('k') | Source/core/inspector/InspectorApplicationCacheAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698