Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h

Issue 2811993007: Worker: Remove cross-thread PostTask functions from WorkerLoaderProxy (Closed)
Patch Set: address review comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 RefPtr<WorkerLoaderProxy>, 144 RefPtr<WorkerLoaderProxy>,
145 RefPtr<WebTaskRunner>,
145 WorkerThreadLifecycleContext*, 146 WorkerThreadLifecycleContext*,
146 std::unique_ptr<CrossThreadResourceRequestData>, 147 std::unique_ptr<CrossThreadResourceRequestData>,
147 const ThreadableLoaderOptions&, 148 const ThreadableLoaderOptions&,
148 const ResourceLoaderOptions&, 149 const ResourceLoaderOptions&,
149 PassRefPtr<WaitableEventWithTasks>); 150 PassRefPtr<WaitableEventWithTasks>);
150 ~MainThreadLoaderHolder() override; 151 ~MainThreadLoaderHolder() override;
151 152
152 void OverrideTimeout(unsigned long timeout_millisecond); 153 void OverrideTimeout(unsigned long timeout_millisecond);
153 void Cancel(); 154 void Cancel();
154 155
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void DidFinishLoading(unsigned long identifier, double finish_time); 205 void DidFinishLoading(unsigned long identifier, double finish_time);
205 void DidFail(const ResourceError&); 206 void DidFail(const ResourceError&);
206 void DidFailAccessControlCheck(const ResourceError&); 207 void DidFailAccessControlCheck(const ResourceError&);
207 void DidFailRedirectCheck(); 208 void DidFailRedirectCheck();
208 void DidDownloadData(int data_length); 209 void DidDownloadData(int data_length);
209 void DidReceiveResourceTiming( 210 void DidReceiveResourceTiming(
210 std::unique_ptr<CrossThreadResourceTimingInfoData>); 211 std::unique_ptr<CrossThreadResourceTimingInfoData>);
211 212
212 Member<WorkerGlobalScope> worker_global_scope_; 213 Member<WorkerGlobalScope> worker_global_scope_;
213 RefPtr<WorkerLoaderProxy> worker_loader_proxy_; 214 RefPtr<WorkerLoaderProxy> worker_loader_proxy_;
215 CrossThreadPersistent<ParentFrameTaskRunners> parent_frame_task_runners_;
214 ThreadableLoaderClient* client_; 216 ThreadableLoaderClient* client_;
215 217
216 ThreadableLoaderOptions threadable_loader_options_; 218 ThreadableLoaderOptions threadable_loader_options_;
217 ResourceLoaderOptions resource_loader_options_; 219 ResourceLoaderOptions resource_loader_options_;
218 BlockingBehavior blocking_behavior_; 220 BlockingBehavior blocking_behavior_;
219 221
220 // |*m_mainThreadLoaderHolder| lives in the main thread. 222 // |*m_mainThreadLoaderHolder| lives in the main thread.
221 CrossThreadPersistent<MainThreadLoaderHolder> main_thread_loader_holder_; 223 CrossThreadPersistent<MainThreadLoaderHolder> main_thread_loader_holder_;
222 }; 224 };
223 225
224 } // namespace blink 226 } // namespace blink
225 227
226 #endif // WorkerThreadableLoader_h 228 #endif // WorkerThreadableLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698