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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // worker thread. | 134 // worker thread. |
135 class MainThreadLoaderHolder final | 135 class MainThreadLoaderHolder final |
136 : public GarbageCollectedFinalized<MainThreadLoaderHolder>, | 136 : public GarbageCollectedFinalized<MainThreadLoaderHolder>, |
137 public ThreadableLoaderClient, | 137 public ThreadableLoaderClient, |
138 public WorkerThreadLifecycleObserver { | 138 public WorkerThreadLifecycleObserver { |
139 USING_GARBAGE_COLLECTED_MIXIN(MainThreadLoaderHolder); | 139 USING_GARBAGE_COLLECTED_MIXIN(MainThreadLoaderHolder); |
140 USING_PRE_FINALIZER(MainThreadLoaderHolder, Cancel); | 140 USING_PRE_FINALIZER(MainThreadLoaderHolder, Cancel); |
141 | 141 |
142 public: | 142 public: |
143 static void CreateAndStart(WorkerThreadableLoader*, | 143 static void CreateAndStart(WorkerThreadableLoader*, |
144 PassRefPtr<WorkerLoaderProxy>, | 144 RefPtr<WorkerLoaderProxy>, |
145 WorkerThreadLifecycleContext*, | 145 WorkerThreadLifecycleContext*, |
146 std::unique_ptr<CrossThreadResourceRequestData>, | 146 std::unique_ptr<CrossThreadResourceRequestData>, |
147 const ThreadableLoaderOptions&, | 147 const ThreadableLoaderOptions&, |
148 const ResourceLoaderOptions&, | 148 const ResourceLoaderOptions&, |
149 PassRefPtr<WaitableEventWithTasks>); | 149 PassRefPtr<WaitableEventWithTasks>); |
150 ~MainThreadLoaderHolder() override; | 150 ~MainThreadLoaderHolder() override; |
151 | 151 |
152 void OverrideTimeout(unsigned long timeout_millisecond); | 152 void OverrideTimeout(unsigned long timeout_millisecond); |
153 void Cancel(); | 153 void Cancel(); |
154 | 154 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 ResourceLoaderOptions resource_loader_options_; | 217 ResourceLoaderOptions resource_loader_options_; |
218 BlockingBehavior blocking_behavior_; | 218 BlockingBehavior blocking_behavior_; |
219 | 219 |
220 // |*m_mainThreadLoaderHolder| lives in the main thread. | 220 // |*m_mainThreadLoaderHolder| lives in the main thread. |
221 CrossThreadPersistent<MainThreadLoaderHolder> main_thread_loader_holder_; | 221 CrossThreadPersistent<MainThreadLoaderHolder> main_thread_loader_holder_; |
222 }; | 222 }; |
223 | 223 |
224 } // namespace blink | 224 } // namespace blink |
225 | 225 |
226 #endif // WorkerThreadableLoader_h | 226 #endif // WorkerThreadableLoader_h |
OLD | NEW |