OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 class ResourceError; | 47 class ResourceError; |
48 class ResourceRequest; | 48 class ResourceRequest; |
49 class WorkerGlobalScope; | 49 class WorkerGlobalScope; |
50 class WorkerLoaderProxy; | 50 class WorkerLoaderProxy; |
51 struct CrossThreadResourceResponseData; | 51 struct CrossThreadResourceResponseData; |
52 struct CrossThreadResourceRequestData; | 52 struct CrossThreadResourceRequestData; |
53 | 53 |
54 class WorkerThreadableLoader FINAL : public RefCounted<WorkerThreadableLoade
r>, public ThreadableLoader { | 54 class WorkerThreadableLoader FINAL : public RefCounted<WorkerThreadableLoade
r>, public ThreadableLoader { |
55 WTF_MAKE_FAST_ALLOCATED; | 55 WTF_MAKE_FAST_ALLOCATED; |
56 public: | 56 public: |
57 static void loadResourceSynchronously(WorkerGlobalScope*, const Resource
Request&, ThreadableLoaderClient&, const ThreadableLoaderOptions&); | 57 static void loadResourceSynchronously(WorkerGlobalScope&, const Resource
Request&, ThreadableLoaderClient&, const ThreadableLoaderOptions&); |
58 static PassRefPtr<WorkerThreadableLoader> create(WorkerGlobalScope* work
erGlobalScope, PassRefPtr<ThreadableLoaderClientWrapper> clientWrapper, PassOwnP
tr<ThreadableLoaderClient> clientBridge, const ResourceRequest& request, const T
hreadableLoaderOptions& options) | 58 static PassRefPtr<WorkerThreadableLoader> create(WorkerGlobalScope& work
erGlobalScope, PassRefPtr<ThreadableLoaderClientWrapper> clientWrapper, PassOwnP
tr<ThreadableLoaderClient> clientBridge, const ResourceRequest& request, const T
hreadableLoaderOptions& options) |
59 { | 59 { |
60 return adoptRef(new WorkerThreadableLoader(workerGlobalScope, client
Wrapper, clientBridge, request, options)); | 60 return adoptRef(new WorkerThreadableLoader(workerGlobalScope, client
Wrapper, clientBridge, request, options)); |
61 } | 61 } |
62 | 62 |
63 virtual ~WorkerThreadableLoader(); | 63 virtual ~WorkerThreadableLoader(); |
64 | 64 |
65 virtual void cancel() OVERRIDE; | 65 virtual void cancel() OVERRIDE; |
66 | 66 |
67 bool done() const { return m_workerClientWrapper->done(); } | 67 bool done() const { return m_workerClientWrapper->done(); } |
68 | 68 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 OwnPtr<ThreadableLoaderClient> m_clientBridge; | 125 OwnPtr<ThreadableLoaderClient> m_clientBridge; |
126 | 126 |
127 // ThreadableLoaderClientWrapper is to be used on the worker context
thread. | 127 // ThreadableLoaderClientWrapper is to be used on the worker context
thread. |
128 // The ref counting is done on either thread. | 128 // The ref counting is done on either thread. |
129 RefPtr<ThreadableLoaderClientWrapper> m_workerClientWrapper; | 129 RefPtr<ThreadableLoaderClientWrapper> m_workerClientWrapper; |
130 | 130 |
131 // Used on the worker context thread. | 131 // Used on the worker context thread. |
132 WorkerLoaderProxy& m_loaderProxy; | 132 WorkerLoaderProxy& m_loaderProxy; |
133 }; | 133 }; |
134 | 134 |
135 WorkerThreadableLoader(WorkerGlobalScope*, PassRefPtr<ThreadableLoaderCl
ientWrapper>, PassOwnPtr<ThreadableLoaderClient>, const ResourceRequest&, const
ThreadableLoaderOptions&); | 135 WorkerThreadableLoader(WorkerGlobalScope&, PassRefPtr<ThreadableLoaderCl
ientWrapper>, PassOwnPtr<ThreadableLoaderClient>, const ResourceRequest&, const
ThreadableLoaderOptions&); |
136 | 136 |
137 RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope; | 137 RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope; |
138 RefPtr<ThreadableLoaderClientWrapper> m_workerClientWrapper; | 138 RefPtr<ThreadableLoaderClientWrapper> m_workerClientWrapper; |
139 MainThreadBridge& m_bridge; | 139 MainThreadBridge& m_bridge; |
140 }; | 140 }; |
141 | 141 |
142 } // namespace WebCore | 142 } // namespace WebCore |
143 | 143 |
144 #endif // WorkerThreadableLoader_h | 144 #endif // WorkerThreadableLoader_h |
OLD | NEW |