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

Side by Side Diff: Source/modules/serviceworkers/InspectorServiceWorkerCacheAgent.h

Issue 1044203004: [Storage] Cache storage inspection on all the frames! (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef InspectorServiceWorkerCacheAgent_h 5 #ifndef InspectorServiceWorkerCacheAgent_h
6 #define InspectorServiceWorkerCacheAgent_h 6 #define InspectorServiceWorkerCacheAgent_h
7 7
8 #include "core/InspectorFrontend.h" 8 #include "core/InspectorFrontend.h"
9 #include "core/inspector/InspectorBaseAgent.h" 9 #include "core/inspector/InspectorBaseAgent.h"
10 #include "wtf/PassOwnPtr.h" 10 #include "wtf/PassOwnPtr.h"
11 #include "wtf/text/WTFString.h" 11 #include "wtf/text/WTFString.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class Page;
15 typedef String ErrorString; 16 typedef String ErrorString;
16 17
17 class ServiceWorkerGlobalScope; 18 class ServiceWorkerGlobalScope;
18 19
19 class InspectorServiceWorkerCacheAgent final : public InspectorBaseAgent<Inspect orServiceWorkerCacheAgent, InspectorFrontend::ServiceWorkerCache>, public Inspec torBackendDispatcher::ServiceWorkerCacheCommandHandler { 20 // TODO(dmurph): rename to InspectorCacheStorageAgent
21 class InspectorServiceWorkerCacheAgent final : public InspectorBaseAgent<Inspect orServiceWorkerCacheAgent, InspectorFrontend::CacheStorage>, public InspectorBac kendDispatcher::CacheStorageCommandHandler {
20 WTF_MAKE_NONCOPYABLE(InspectorServiceWorkerCacheAgent); 22 WTF_MAKE_NONCOPYABLE(InspectorServiceWorkerCacheAgent);
21 23
22 public: 24 public:
23 static PassOwnPtrWillBeRawPtr<InspectorServiceWorkerCacheAgent> create(Servi ceWorkerGlobalScope* workerGlobalScope) 25 static PassOwnPtrWillBeRawPtr<InspectorServiceWorkerCacheAgent> create(Page* page)
24 { 26 {
25 return adoptPtrWillBeNoop(new InspectorServiceWorkerCacheAgent(workerGlo balScope)); 27 return adoptPtrWillBeNoop(new InspectorServiceWorkerCacheAgent(page));
26 } 28 }
27 29
28 virtual ~InspectorServiceWorkerCacheAgent(); 30 virtual ~InspectorServiceWorkerCacheAgent();
29 31
30 DECLARE_VIRTUAL_TRACE(); 32 DECLARE_VIRTUAL_TRACE();
31 33
32 virtual void requestCacheNames(ErrorString*, PassRefPtrWillBeRawPtr<RequestC acheNamesCallback>) override; 34 virtual void requestCacheNames(ErrorString*, const String& securityOrigin, P assRefPtrWillBeRawPtr<RequestCacheNamesCallback>) override;
33 virtual void requestEntries(ErrorString*, const String& cacheName, int skipC ount, int pageSize, PassRefPtrWillBeRawPtr<RequestEntriesCallback>) override; 35 virtual void requestEntries(ErrorString*, const String& securityOrigin, cons t String& cacheName, int skipCount, int pageSize, PassRefPtrWillBeRawPtr<Request EntriesCallback>) override;
34 virtual void deleteCache(ErrorString*, const String& cacheName, PassRefPtrWi llBeRawPtr<DeleteCacheCallback>) override; 36 virtual void deleteCache(ErrorString*, const String& securityOrigin, const S tring& cacheName, PassRefPtrWillBeRawPtr<DeleteCacheCallback>) override;
35 37
36 private: 38 private:
37 explicit InspectorServiceWorkerCacheAgent(ServiceWorkerGlobalScope*); 39 explicit InspectorServiceWorkerCacheAgent(Page*);
38 40
39 ServiceWorkerGlobalScope* m_globalScope; 41 RawPtrWillBeMember<Page> m_page;
40 }; 42 };
41 43
42 } // namespace blink 44 } // namespace blink
43 45
44 #endif // InspectorServiceWorkerCacheAgent_h 46 #endif // InspectorServiceWorkerCacheAgent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698