| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 class SecurityOrigin; | 51 class SecurityOrigin; |
| 52 class ThreadableLoaderClient; | 52 class ThreadableLoaderClient; |
| 53 | 53 |
| 54 class DocumentThreadableLoader FINAL : public ThreadableLoader, private Resource
Owner<RawResource> { | 54 class DocumentThreadableLoader FINAL : public ThreadableLoader, private Resource
Owner<RawResource> { |
| 55 WTF_MAKE_FAST_ALLOCATED; | 55 WTF_MAKE_FAST_ALLOCATED; |
| 56 public: | 56 public: |
| 57 static void loadResourceSynchronously(Document&, const ResourceRequest&,
ThreadableLoaderClient&, const ThreadableLoaderOptions&); | 57 static void loadResourceSynchronously(Document&, const ResourceRequest&,
ThreadableLoaderClient&, const ThreadableLoaderOptions&); |
| 58 static PassRefPtr<DocumentThreadableLoader> create(Document&, Threadable
LoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&); | 58 static PassRefPtr<DocumentThreadableLoader> create(Document&, Threadable
LoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&); |
| 59 virtual ~DocumentThreadableLoader(); | 59 virtual ~DocumentThreadableLoader(); |
| 60 | 60 |
| 61 virtual void overrideTimeout(unsigned long timeout) OVERRIDE; |
| 62 |
| 61 virtual void cancel() OVERRIDE; | 63 virtual void cancel() OVERRIDE; |
| 62 void setDefersLoading(bool); | 64 void setDefersLoading(bool); |
| 63 | 65 |
| 64 private: | 66 private: |
| 65 enum BlockingBehavior { | 67 enum BlockingBehavior { |
| 66 LoadSynchronously, | 68 LoadSynchronously, |
| 67 LoadAsynchronously | 69 LoadAsynchronously |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 DocumentThreadableLoader(Document&, ThreadableLoaderClient*, BlockingBeh
avior, const ResourceRequest&, const ThreadableLoaderOptions&); | 72 DocumentThreadableLoader(Document&, ThreadableLoaderClient*, BlockingBeh
avior, const ResourceRequest&, const ThreadableLoaderOptions&); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 94 | 96 |
| 95 ThreadableLoaderClient* m_client; | 97 ThreadableLoaderClient* m_client; |
| 96 Document& m_document; | 98 Document& m_document; |
| 97 ThreadableLoaderOptions m_options; | 99 ThreadableLoaderOptions m_options; |
| 98 bool m_sameOriginRequest; | 100 bool m_sameOriginRequest; |
| 99 bool m_simpleRequest; | 101 bool m_simpleRequest; |
| 100 bool m_async; | 102 bool m_async; |
| 101 OwnPtr<ResourceRequest> m_actualRequest; // non-null during Access Contr
ol preflight checks | 103 OwnPtr<ResourceRequest> m_actualRequest; // non-null during Access Contr
ol preflight checks |
| 102 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i
n case of a cross-origin redirect. | 104 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i
n case of a cross-origin redirect. |
| 103 Timer<DocumentThreadableLoader> m_timeoutTimer; | 105 Timer<DocumentThreadableLoader> m_timeoutTimer; |
| 106 double m_requestStarted; // Time an asynchronous fetch request is starte
d (loadRequest) |
| 104 }; | 107 }; |
| 105 | 108 |
| 106 } // namespace WebCore | 109 } // namespace WebCore |
| 107 | 110 |
| 108 #endif // DocumentThreadableLoader_h | 111 #endif // DocumentThreadableLoader_h |
| OLD | NEW |