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

Side by Side Diff: third_party/WebKit/Source/core/workers/Worklet.cpp

Issue 2911093002: Worklet: Move loader client impl from ThreadedWorklet to ThreadedWorkletMessagingProxy
Patch Set: rebase Created 3 years, 6 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/workers/Worklet.h" 5 #include "core/workers/Worklet.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/TaskRunnerHelper.h" 10 #include "core/dom/TaskRunnerHelper.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // |kUnspecedLoading| is used here because this is a part of script module 55 // |kUnspecedLoading| is used here because this is a part of script module
56 // loading. 56 // loading.
57 TaskRunnerHelper::Get(TaskType::kUnspecedLoading, script_state) 57 TaskRunnerHelper::Get(TaskType::kUnspecedLoading, script_state)
58 ->PostTask( 58 ->PostTask(
59 BLINK_FROM_HERE, 59 BLINK_FROM_HERE,
60 WTF::Bind(&Worklet::FetchAndInvokeScript, WrapPersistent(this), 60 WTF::Bind(&Worklet::FetchAndInvokeScript, WrapPersistent(this),
61 module_url_record, options, WrapPersistent(resolver))); 61 module_url_record, options, WrapPersistent(resolver)));
62 return promise; 62 return promise;
63 } 63 }
64 64
65 WebURLRequest::FetchCredentialsMode Worklet::ParseCredentialsOption(
66 const String& credentials_option) {
67 if (credentials_option == "omit")
68 return WebURLRequest::kFetchCredentialsModeOmit;
69 if (credentials_option == "same-origin")
70 return WebURLRequest::kFetchCredentialsModeSameOrigin;
71 if (credentials_option == "include")
72 return WebURLRequest::kFetchCredentialsModeInclude;
73 NOTREACHED();
74 return WebURLRequest::kFetchCredentialsModeOmit;
75 }
76
65 DEFINE_TRACE(Worklet) { 77 DEFINE_TRACE(Worklet) {
66 ContextLifecycleObserver::Trace(visitor); 78 ContextLifecycleObserver::Trace(visitor);
67 } 79 }
68 80
69 } // namespace blink 81 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/workers/Worklet.h ('k') | third_party/WebKit/Source/core/workers/WorkletGlobalScopeProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698