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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/CompositeDataConsumerHandle.h

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: update 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CompositeDataConsumerHandle_h 5 #ifndef CompositeDataConsumerHandle_h
6 #define CompositeDataConsumerHandle_h 6 #define CompositeDataConsumerHandle_h
7 7
8 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebDataConsumerHandle.h" 10 #include "public/platform/WebDataConsumerHandle.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 static std::unique_ptr<WebDataConsumerHandle> create(std::unique_ptr<WebData ConsumerHandle> handle, T* updater) 49 static std::unique_ptr<WebDataConsumerHandle> create(std::unique_ptr<WebData ConsumerHandle> handle, T* updater)
50 { 50 {
51 DCHECK(handle); 51 DCHECK(handle);
52 Updater* u = nullptr; 52 Updater* u = nullptr;
53 std::unique_ptr<CompositeDataConsumerHandle> p = wrapUnique(new Composit eDataConsumerHandle(std::move(handle), &u)); 53 std::unique_ptr<CompositeDataConsumerHandle> p = wrapUnique(new Composit eDataConsumerHandle(std::move(handle), &u));
54 *updater = u; 54 *updater = u;
55 return std::move(p); 55 return std::move(p);
56 } 56 }
57 ~CompositeDataConsumerHandle() override; 57 ~CompositeDataConsumerHandle() override;
58 58
59 std::unique_ptr<Reader> obtainReader(Client*) override; 59 std::unique_ptr<Reader> obtainReader(Client*, std::unique_ptr<WebTaskRunner> readerTaskRunner) override;
60 60
61 private: 61 private:
62 class ReaderImpl; 62 class ReaderImpl;
63 63
64 const char* debugName() const override { return "CompositeDataConsumerHandle "; } 64 const char* debugName() const override { return "CompositeDataConsumerHandle "; }
65 65
66 CompositeDataConsumerHandle(std::unique_ptr<WebDataConsumerHandle>, Updater* *); 66 CompositeDataConsumerHandle(std::unique_ptr<WebDataConsumerHandle>, Updater* *);
67 67
68 RefPtr<Context> m_context; 68 RefPtr<Context> m_context;
69 }; 69 };
70 70
71 } // namespace blink 71 } // namespace blink
72 72
73 #endif // CompositeDataConsumerHandle_h 73 #endif // CompositeDataConsumerHandle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698