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

Side by Side Diff: third_party/WebKit/Source/core/loader/ThreadableLoader.cpp

Issue 1728803002: Rename WorkerThread to WorkerScript Base URL: https://chromium.googlesource.com/chromium/src.git@workerscript-controller
Patch Set: Created 4 years, 9 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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "core/loader/ThreadableLoader.h" 31 #include "core/loader/ThreadableLoader.h"
32 32
33 #include "core/dom/Document.h" 33 #include "core/dom/Document.h"
34 #include "core/dom/ExecutionContext.h" 34 #include "core/dom/ExecutionContext.h"
35 #include "core/loader/DocumentThreadableLoader.h" 35 #include "core/loader/DocumentThreadableLoader.h"
36 #include "core/loader/ThreadableLoaderClientWrapper.h" 36 #include "core/loader/ThreadableLoaderClientWrapper.h"
37 #include "core/loader/WorkerThreadableLoader.h" 37 #include "core/loader/WorkerThreadableLoader.h"
38 #include "core/workers/WorkerGlobalScope.h" 38 #include "core/workers/WorkerGlobalScope.h"
39 #include "core/workers/WorkerThread.h"
40 39
41 namespace blink { 40 namespace blink {
42 41
43 PassRefPtr<ThreadableLoader> ThreadableLoader::create(ExecutionContext& context, ThreadableLoaderClient* client, const ThreadableLoaderOptions& options, const R esourceLoaderOptions& resourceLoaderOptions) 42 PassRefPtr<ThreadableLoader> ThreadableLoader::create(ExecutionContext& context, ThreadableLoaderClient* client, const ThreadableLoaderOptions& options, const R esourceLoaderOptions& resourceLoaderOptions)
44 { 43 {
45 ASSERT(client); 44 ASSERT(client);
46 45
47 if (context.isWorkerGlobalScope()) { 46 if (context.isWorkerGlobalScope()) {
48 return WorkerThreadableLoader::create(toWorkerGlobalScope(context), clie nt, options, resourceLoaderOptions); 47 return WorkerThreadableLoader::create(toWorkerGlobalScope(context), clie nt, options, resourceLoaderOptions);
49 } 48 }
50 49
51 return DocumentThreadableLoader::create(toDocument(context), client, options , resourceLoaderOptions); 50 return DocumentThreadableLoader::create(toDocument(context), client, options , resourceLoaderOptions);
52 } 51 }
53 52
54 void ThreadableLoader::loadResourceSynchronously(ExecutionContext& context, cons t ResourceRequest& request, ThreadableLoaderClient& client, const ThreadableLoad erOptions& options, const ResourceLoaderOptions& resourceLoaderOptions) 53 void ThreadableLoader::loadResourceSynchronously(ExecutionContext& context, cons t ResourceRequest& request, ThreadableLoaderClient& client, const ThreadableLoad erOptions& options, const ResourceLoaderOptions& resourceLoaderOptions)
55 { 54 {
56 if (context.isWorkerGlobalScope()) { 55 if (context.isWorkerGlobalScope()) {
57 WorkerThreadableLoader::loadResourceSynchronously(toWorkerGlobalScope(co ntext), request, client, options, resourceLoaderOptions); 56 WorkerThreadableLoader::loadResourceSynchronously(toWorkerGlobalScope(co ntext), request, client, options, resourceLoaderOptions);
58 return; 57 return;
59 } 58 }
60 59
61 DocumentThreadableLoader::loadResourceSynchronously(toDocument(context), req uest, client, options, resourceLoaderOptions); 60 DocumentThreadableLoader::loadResourceSynchronously(toDocument(context), req uest, client, options, resourceLoaderOptions);
62 } 61 }
63 62
64 } // namespace blink 63 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698