| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 { | 39 { |
| 40 return adoptPtr(new PreloadRequest(initiatorName, initiatorPosition, res
ourceURL, baseURL, resourceType)); | 40 return adoptPtr(new PreloadRequest(initiatorName, initiatorPosition, res
ourceURL, baseURL, resourceType)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool isSafeToSendToAnotherThread() const; | 43 bool isSafeToSendToAnotherThread() const; |
| 44 | 44 |
| 45 FetchRequest resourceRequest(Document*); | 45 FetchRequest resourceRequest(Document*); |
| 46 | 46 |
| 47 const String& charset() const { return m_charset; } | 47 const String& charset() const { return m_charset; } |
| 48 double discoveryTime() const { return m_discoveryTime; } | 48 double discoveryTime() const { return m_discoveryTime; } |
| 49 FetchRequest::DeferOption defer() const { return m_defer; } | |
| 50 void setDefer(FetchRequest::DeferOption defer) { m_defer = defer; } | 49 void setDefer(FetchRequest::DeferOption defer) { m_defer = defer; } |
| 51 void setCharset(const String& charset) { m_charset = charset.isolatedCopy();
} | 50 void setCharset(const String& charset) { m_charset = charset.isolatedCopy();
} |
| 52 void setCrossOriginEnabled(StoredCredentials allowCredentials) | 51 void setCrossOriginEnabled(StoredCredentials allowCredentials) |
| 53 { | 52 { |
| 54 m_isCORSEnabled = true; | 53 m_isCORSEnabled = true; |
| 55 m_allowCredentials = allowCredentials; | 54 m_allowCredentials = allowCredentials; |
| 56 } | 55 } |
| 57 | 56 |
| 58 Resource::Type resourceType() const { return m_resourceType; } | 57 Resource::Type resourceType() const { return m_resourceType; } |
| 59 | 58 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 87 | 86 |
| 88 typedef Vector<OwnPtr<PreloadRequest>> PreloadRequestStream; | 87 typedef Vector<OwnPtr<PreloadRequest>> PreloadRequestStream; |
| 89 | 88 |
| 90 class HTMLResourcePreloader final : public NoBaseWillBeGarbageCollected<HTMLReso
urcePreloader> { | 89 class HTMLResourcePreloader final : public NoBaseWillBeGarbageCollected<HTMLReso
urcePreloader> { |
| 91 WTF_MAKE_NONCOPYABLE(HTMLResourcePreloader); WTF_MAKE_FAST_ALLOCATED_WILL_BE
_REMOVED; | 90 WTF_MAKE_NONCOPYABLE(HTMLResourcePreloader); WTF_MAKE_FAST_ALLOCATED_WILL_BE
_REMOVED; |
| 92 public: | 91 public: |
| 93 static PassOwnPtrWillBeRawPtr<HTMLResourcePreloader> create(Document&); | 92 static PassOwnPtrWillBeRawPtr<HTMLResourcePreloader> create(Document&); |
| 94 void trace(Visitor*); | 93 void trace(Visitor*); |
| 95 | 94 |
| 96 void takeAndPreload(PreloadRequestStream&); | 95 void takeAndPreload(PreloadRequestStream&); |
| 97 void preload(PassOwnPtr<PreloadRequest>); | |
| 98 | 96 |
| 99 private: | 97 private: |
| 100 explicit HTMLResourcePreloader(Document&); | 98 explicit HTMLResourcePreloader(Document&); |
| 101 | 99 |
| 100 void preload(PassOwnPtr<PreloadRequest>); |
| 101 |
| 102 RawPtrWillBeMember<Document> m_document; | 102 RawPtrWillBeMember<Document> m_document; |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } | 105 } |
| 106 | 106 |
| 107 #endif | 107 #endif |
| OLD | NEW |