OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef LinkResource_h | 31 #ifndef LinkResource_h |
32 #define LinkResource_h | 32 #define LinkResource_h |
33 | 33 |
| 34 #include "core/CoreExport.h" |
34 #include "core/fetch/FetchRequest.h" | 35 #include "core/fetch/FetchRequest.h" |
35 #include "platform/heap/Handle.h" | 36 #include "platform/heap/Handle.h" |
36 #include "platform/weborigin/KURL.h" | 37 #include "platform/weborigin/KURL.h" |
37 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
38 | 39 |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
41 class HTMLLinkElement; | 42 class HTMLLinkElement; |
42 class LocalFrame; | 43 class LocalFrame; |
43 | 44 |
44 class LinkResource : public NoBaseWillBeGarbageCollectedFinalized<LinkResource>
{ | 45 class CORE_EXPORT LinkResource : public NoBaseWillBeGarbageCollectedFinalized<Li
nkResource> { |
45 WTF_MAKE_NONCOPYABLE(LinkResource); USING_FAST_MALLOC_WILL_BE_REMOVED(LinkRe
source); | 46 WTF_MAKE_NONCOPYABLE(LinkResource); USING_FAST_MALLOC_WILL_BE_REMOVED(LinkRe
source); |
46 public: | 47 public: |
47 enum LinkResourceType { | 48 enum LinkResourceType { |
48 Style, | 49 Style, |
49 Import, | 50 Import, |
50 Manifest | 51 Manifest, |
| 52 Other |
51 }; | 53 }; |
52 | 54 |
53 explicit LinkResource(HTMLLinkElement*); | 55 explicit LinkResource(HTMLLinkElement*); |
54 virtual ~LinkResource(); | 56 virtual ~LinkResource(); |
55 | 57 |
56 bool shouldLoadResource() const; | 58 bool shouldLoadResource() const; |
57 LocalFrame* loadingFrame() const; | 59 LocalFrame* loadingFrame() const; |
58 | 60 |
59 virtual LinkResourceType type() const = 0; | 61 virtual LinkResourceType type() const = 0; |
60 virtual void process() = 0; | 62 virtual void process() = 0; |
(...skipping 19 matching lines...) Expand all Loading... |
80 | 82 |
81 private: | 83 private: |
82 RawPtrWillBeMember<HTMLLinkElement> m_owner; | 84 RawPtrWillBeMember<HTMLLinkElement> m_owner; |
83 KURL m_url; | 85 KURL m_url; |
84 AtomicString m_charset; | 86 AtomicString m_charset; |
85 }; | 87 }; |
86 | 88 |
87 } // namespace blink | 89 } // namespace blink |
88 | 90 |
89 #endif // LinkResource_h | 91 #endif // LinkResource_h |
OLD | NEW |