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 KURL; | 51 class KURL; |
52 class ResourceRequest; | 52 class ResourceRequest; |
53 class SecurityOrigin; | 53 class SecurityOrigin; |
54 class ThreadableLoaderClient; | 54 class ThreadableLoaderClient; |
55 | 55 |
56 class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv
ate ResourceOwner<RawResource> { | 56 class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv
ate ResourceOwner<RawResource> { |
57 WTF_MAKE_FAST_ALLOCATED(DocumentThreadableLoader); | 57 WTF_MAKE_FAST_ALLOCATED(DocumentThreadableLoader); |
58 public: | 58 public: |
59 static void loadResourceSynchronously(Document&, const ResourceRequest&,
ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOp
tions&); | 59 static void loadResourceSynchronously(Document&, const ResourceRequest&,
ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOp
tions&); |
60 static PassRefPtr<DocumentThreadableLoader> create(Document&, Threadable
LoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Res
ourceLoaderOptions&); | 60 static PassRefPtr<DocumentThreadableLoader> create(Document&, Threadable
LoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Res
ourceLoaderOptions&); |
61 virtual ~DocumentThreadableLoader(); | 61 ~DocumentThreadableLoader() override; |
62 | 62 |
63 virtual void overrideTimeout(unsigned long timeout) override; | 63 void overrideTimeout(unsigned long timeout) override; |
64 | 64 |
65 virtual void cancel() override; | 65 void cancel() override; |
66 void setDefersLoading(bool); | 66 void setDefersLoading(bool); |
67 | 67 |
68 private: | 68 private: |
69 enum BlockingBehavior { | 69 enum BlockingBehavior { |
70 LoadSynchronously, | 70 LoadSynchronously, |
71 LoadAsynchronously | 71 LoadAsynchronously |
72 }; | 72 }; |
73 | 73 |
74 DocumentThreadableLoader(Document&, ThreadableLoaderClient*, BlockingBeh
avior, const ResourceRequest&, const ThreadableLoaderOptions&, const ResourceLoa
derOptions&); | 74 DocumentThreadableLoader(Document&, ThreadableLoaderClient*, BlockingBeh
avior, const ResourceRequest&, const ThreadableLoaderOptions&, const ResourceLoa
derOptions&); |
75 | 75 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // cross-origin redirects. | 168 // cross-origin redirects. |
169 // This is used to limit the number of redirects. | 169 // This is used to limit the number of redirects. |
170 // But this value is not the max number of total redirects allowed, | 170 // But this value is not the max number of total redirects allowed, |
171 // because same-origin redirects are not counted here. | 171 // because same-origin redirects are not counted here. |
172 int m_corsRedirectLimit; | 172 int m_corsRedirectLimit; |
173 }; | 173 }; |
174 | 174 |
175 } // namespace blink | 175 } // namespace blink |
176 | 176 |
177 #endif // DocumentThreadableLoader_h | 177 #endif // DocumentThreadableLoader_h |
OLD | NEW |