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