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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp

Issue 2177243002: Use per-frame TaskRunner instead of thread's default in DataConsumerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data_consumer_handle_unique_ptr
Patch Set: test fix Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "modules/serviceworkers/RespondWithObserver.h" 5 #include "modules/serviceworkers/RespondWithObserver.h"
6 6
7 #include "bindings/core/v8/ScriptFunction.h" 7 #include "bindings/core/v8/ScriptFunction.h"
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return isNavigationRequest(frameType) || requestContext == WebURLRequest::Re questContextSharedWorker || requestContext == WebURLRequest::RequestContextWorke r; 86 return isNavigationRequest(frameType) || requestContext == WebURLRequest::Re questContextSharedWorker || requestContext == WebURLRequest::RequestContextWorke r;
87 } 87 }
88 88
89 class NoopLoaderClient final : public GarbageCollectedFinalized<NoopLoaderClient >, public FetchDataLoader::Client { 89 class NoopLoaderClient final : public GarbageCollectedFinalized<NoopLoaderClient >, public FetchDataLoader::Client {
90 WTF_MAKE_NONCOPYABLE(NoopLoaderClient); 90 WTF_MAKE_NONCOPYABLE(NoopLoaderClient);
91 USING_GARBAGE_COLLECTED_MIXIN(NoopLoaderClient); 91 USING_GARBAGE_COLLECTED_MIXIN(NoopLoaderClient);
92 public: 92 public:
93 NoopLoaderClient() = default; 93 NoopLoaderClient() = default;
94 void didFetchDataLoadedStream() override {} 94 void didFetchDataLoadedStream() override {}
95 void didFetchDataLoadFailed() override {} 95 void didFetchDataLoadFailed() override {}
96 WebTaskRunner* getTaskRunner() override { return nullptr; }
96 DEFINE_INLINE_TRACE() { FetchDataLoader::Client::trace(visitor); } 97 DEFINE_INLINE_TRACE() { FetchDataLoader::Client::trace(visitor); }
97 }; 98 };
98 99
99 } // namespace 100 } // namespace
100 101
101 class RespondWithObserver::ThenFunction final : public ScriptFunction { 102 class RespondWithObserver::ThenFunction final : public ScriptFunction {
102 public: 103 public:
103 enum ResolveType { 104 enum ResolveType {
104 Fulfilled, 105 Fulfilled,
105 Rejected, 106 Rejected,
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 { 286 {
286 } 287 }
287 288
288 DEFINE_TRACE(RespondWithObserver) 289 DEFINE_TRACE(RespondWithObserver)
289 { 290 {
290 visitor->trace(m_observer); 291 visitor->trace(m_observer);
291 ContextLifecycleObserver::trace(visitor); 292 ContextLifecycleObserver::trace(visitor);
292 } 293 }
293 294
294 } // namespace blink 295 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698