| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 LinkResourceType 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 void mediaChanged() { } |
| 63 virtual bool hasLoaded() const = 0; | 64 virtual bool hasLoaded() const = 0; |
| 64 | 65 |
| 65 DECLARE_VIRTUAL_TRACE(); | 66 DECLARE_VIRTUAL_TRACE(); |
| 66 | 67 |
| 67 protected: | 68 protected: |
| 68 RawPtrWillBeMember<HTMLLinkElement> m_owner; | 69 RawPtrWillBeMember<HTMLLinkElement> m_owner; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 class LinkRequestBuilder { | 72 class LinkRequestBuilder { |
| 72 STACK_ALLOCATED(); | 73 STACK_ALLOCATED(); |
| 73 public: | 74 public: |
| 74 explicit LinkRequestBuilder(HTMLLinkElement* owner); | 75 explicit LinkRequestBuilder(HTMLLinkElement* owner); |
| 75 | 76 |
| 76 bool isValid() const { return !m_url.isEmpty() && m_url.isValid(); } | 77 bool isValid() const { return !m_url.isEmpty() && m_url.isValid(); } |
| 77 const KURL& url() const { return m_url; } | 78 const KURL& url() const { return m_url; } |
| 78 const AtomicString& charset() const { return m_charset; } | 79 const AtomicString& charset() const { return m_charset; } |
| 79 FetchRequest build(bool lowPriority) const; | 80 FetchRequest build(bool lowPriority) const; |
| 80 | 81 |
| 81 private: | 82 private: |
| 82 RawPtrWillBeMember<HTMLLinkElement> m_owner; | 83 RawPtrWillBeMember<HTMLLinkElement> m_owner; |
| 83 KURL m_url; | 84 KURL m_url; |
| 84 AtomicString m_charset; | 85 AtomicString m_charset; |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace blink | 88 } // namespace blink |
| 88 | 89 |
| 89 #endif // LinkResource_h | 90 #endif // LinkResource_h |
| OLD | NEW |