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 26 matching lines...) Expand all Loading... |
37 #include "wtf/text/WTFString.h" | 37 #include "wtf/text/WTFString.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class HTMLLinkElement; | 41 class HTMLLinkElement; |
42 class LocalFrame; | 42 class LocalFrame; |
43 | 43 |
44 class LinkResource : public NoBaseWillBeGarbageCollectedFinalized<LinkResource>
{ | 44 class LinkResource : public NoBaseWillBeGarbageCollectedFinalized<LinkResource>
{ |
45 WTF_MAKE_NONCOPYABLE(LinkResource); USING_FAST_MALLOC_WILL_BE_REMOVED(LinkRe
source); | 45 WTF_MAKE_NONCOPYABLE(LinkResource); USING_FAST_MALLOC_WILL_BE_REMOVED(LinkRe
source); |
46 public: | 46 public: |
47 enum Type { | 47 enum LinkResourceType { |
48 Style, | 48 Style, |
49 Import, | 49 Import, |
50 Manifest | 50 Manifest |
51 }; | 51 }; |
52 | 52 |
53 explicit LinkResource(HTMLLinkElement*); | 53 explicit LinkResource(HTMLLinkElement*); |
54 virtual ~LinkResource(); | 54 virtual ~LinkResource(); |
55 | 55 |
56 bool shouldLoadResource() const; | 56 bool shouldLoadResource() const; |
57 LocalFrame* loadingFrame() const; | 57 LocalFrame* loadingFrame() const; |
58 | 58 |
59 virtual Type type() const = 0; | 59 virtual LinkResourceType type() const = 0; |
60 virtual void process() = 0; | 60 virtual void process() = 0; |
61 virtual void ownerRemoved() { } | 61 virtual void ownerRemoved() { } |
62 virtual void ownerInserted() { } | 62 virtual void ownerInserted() { } |
63 virtual bool hasLoaded() const = 0; | 63 virtual bool hasLoaded() const = 0; |
64 | 64 |
65 DECLARE_VIRTUAL_TRACE(); | 65 DECLARE_VIRTUAL_TRACE(); |
66 | 66 |
67 protected: | 67 protected: |
68 RawPtrWillBeMember<HTMLLinkElement> m_owner; | 68 RawPtrWillBeMember<HTMLLinkElement> m_owner; |
69 }; | 69 }; |
(...skipping 10 matching lines...) Expand all Loading... |
80 | 80 |
81 private: | 81 private: |
82 RawPtrWillBeMember<HTMLLinkElement> m_owner; | 82 RawPtrWillBeMember<HTMLLinkElement> m_owner; |
83 KURL m_url; | 83 KURL m_url; |
84 AtomicString m_charset; | 84 AtomicString m_charset; |
85 }; | 85 }; |
86 | 86 |
87 } // namespace blink | 87 } // namespace blink |
88 | 88 |
89 #endif // LinkResource_h | 89 #endif // LinkResource_h |
OLD | NEW |