OLD | NEW |
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 InspectorCacheStorageAgent_h |
6 #define InspectorServiceWorkerCacheAgent_h | 6 #define InspectorCacheStorageAgent_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 typedef String ErrorString; | 15 typedef String ErrorString; |
16 | 16 |
17 class ServiceWorkerGlobalScope; | 17 class ServiceWorkerGlobalScope; |
18 | 18 |
19 class InspectorServiceWorkerCacheAgent final : public InspectorBaseAgent<Inspect
orServiceWorkerCacheAgent, InspectorFrontend::ServiceWorkerCache>, public Inspec
torBackendDispatcher::ServiceWorkerCacheCommandHandler { | 19 class InspectorCacheStorageAgent final : public InspectorBaseAgent<InspectorCach
eStorageAgent, InspectorFrontend::ServiceWorkerCache>, public InspectorBackendDi
spatcher::ServiceWorkerCacheCommandHandler { |
20 WTF_MAKE_NONCOPYABLE(InspectorServiceWorkerCacheAgent); | 20 WTF_MAKE_NONCOPYABLE(InspectorCacheStorageAgent); |
21 | 21 |
22 public: | 22 public: |
23 static PassOwnPtrWillBeRawPtr<InspectorServiceWorkerCacheAgent> create(Servi
ceWorkerGlobalScope* workerGlobalScope) | 23 static PassOwnPtrWillBeRawPtr<InspectorCacheStorageAgent> create(ServiceWork
erGlobalScope* workerGlobalScope) |
24 { | 24 { |
25 return adoptPtrWillBeNoop(new InspectorServiceWorkerCacheAgent(workerGlo
balScope)); | 25 return adoptPtrWillBeNoop(new InspectorCacheStorageAgent(workerGlobalSco
pe)); |
26 } | 26 } |
27 | 27 |
28 virtual ~InspectorServiceWorkerCacheAgent(); | 28 virtual ~InspectorCacheStorageAgent(); |
29 | 29 |
30 DECLARE_VIRTUAL_TRACE(); | 30 DECLARE_VIRTUAL_TRACE(); |
31 | 31 |
32 virtual void requestCacheNames(ErrorString*, PassRefPtrWillBeRawPtr<RequestC
acheNamesCallback>) override; | 32 virtual void requestCacheNames(ErrorString*, PassRefPtrWillBeRawPtr<RequestC
acheNamesCallback>) override; |
33 virtual void requestEntries(ErrorString*, const String& cacheName, int skipC
ount, int pageSize, PassRefPtrWillBeRawPtr<RequestEntriesCallback>) override; | 33 virtual void requestEntries(ErrorString*, const String& cacheName, int skipC
ount, int pageSize, PassRefPtrWillBeRawPtr<RequestEntriesCallback>) override; |
34 virtual void deleteCache(ErrorString*, const String& cacheName, PassRefPtrWi
llBeRawPtr<DeleteCacheCallback>) override; | 34 virtual void deleteCache(ErrorString*, const String& cacheName, PassRefPtrWi
llBeRawPtr<DeleteCacheCallback>) override; |
35 | 35 |
36 private: | 36 private: |
37 explicit InspectorServiceWorkerCacheAgent(ServiceWorkerGlobalScope*); | 37 explicit InspectorCacheStorageAgent(ServiceWorkerGlobalScope*); |
38 | 38 |
39 ServiceWorkerGlobalScope* m_globalScope; | 39 ServiceWorkerGlobalScope* m_globalScope; |
40 }; | 40 }; |
41 | 41 |
42 } // namespace blink | 42 } // namespace blink |
43 | 43 |
44 #endif // InspectorServiceWorkerCacheAgent_h | 44 #endif // InspectorCacheStorageAgent_h |
OLD | NEW |