OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SVGResourceClient_h | 5 #ifndef SVGResourceClient_h |
6 #define SVGResourceClient_h | 6 #define SVGResourceClient_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/fetch/DocumentResource.h" | |
10 #include "core/svg/SVGFilterElement.h" | |
11 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
12 | 10 |
13 namespace blink { | 11 namespace blink { |
14 | 12 |
15 class Document; | 13 class CORE_EXPORT SVGResourceClient : public GarbageCollectedMixin { |
16 class FilterOperations; | 14 public: |
| 15 virtual ~SVGResourceClient() {} |
17 | 16 |
18 class CORE_EXPORT SVGResourceClient : public DocumentResourceClient { | 17 virtual void resourceContentChanged() = 0; |
19 USING_PRE_FINALIZER(SVGResourceClient, clearFilterReferences); | 18 virtual void resourceElementChanged() = 0; |
20 | 19 |
21 public: | 20 DEFINE_INLINE_VIRTUAL_TRACE() {} |
22 SVGResourceClient(); | |
23 ~SVGResourceClient() override; | |
24 void addFilterReferences(const FilterOperations&, const Document&); | |
25 void clearFilterReferences(); | |
26 | 21 |
27 virtual void filterNeedsInvalidation() = 0; | 22 protected: |
28 | 23 SVGResourceClient() {} |
29 void filterWillBeDestroyed(SVGFilterElement*); | |
30 | |
31 void notifyFinished(Resource*) override; | |
32 String debugName() const override { return "SVGResourceClient"; } | |
33 | |
34 DECLARE_TRACE(); | |
35 | |
36 private: | |
37 HeapHashSet<WeakMember<SVGFilterElement>> m_internalFilterReferences; | |
38 HeapVector<Member<DocumentResource>> m_externalFilterReferences; | |
39 }; | 24 }; |
40 | 25 |
41 } // namespace blink | 26 } // namespace blink |
42 | 27 |
43 #endif // SVGResourceClient_h | 28 #endif // SVGResourceClient_h |
OLD | NEW |