OLD | NEW |
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" |
| 11 #include "wtf/Allocator.h" |
11 #include "wtf/OwnPtr.h" | 12 #include "wtf/OwnPtr.h" |
12 #include "wtf/PassOwnPtr.h" | 13 #include "wtf/PassOwnPtr.h" |
13 #include "wtf/RefPtr.h" | 14 #include "wtf/RefPtr.h" |
14 | 15 |
15 namespace blink { | 16 namespace blink { |
16 | 17 |
17 class WebThread; | 18 class WebThread; |
18 | 19 |
19 // This is a utility class to construct a composite data consumer handle. It | 20 // This is a utility class to construct a composite data consumer handle. It |
20 // owns a web data consumer handle and delegates methods. A user can update | 21 // owns a web data consumer handle and delegates methods. A user can update |
21 // the handle by using |update| method. | 22 // the handle by using |update| method. |
22 class MODULES_EXPORT CompositeDataConsumerHandle final : public WebDataConsumerH
andle { | 23 class MODULES_EXPORT CompositeDataConsumerHandle final : public WebDataConsumerH
andle { |
23 WTF_MAKE_NONCOPYABLE(CompositeDataConsumerHandle); | 24 WTF_MAKE_NONCOPYABLE(CompositeDataConsumerHandle); |
| 25 WTF_MAKE_FAST_ALLOCATED(CompositeDataConsumerHandle); |
24 class Context; | 26 class Context; |
25 public: | 27 public: |
26 // An Updater is bound to the creator thread. | 28 // An Updater is bound to the creator thread. |
27 class MODULES_EXPORT Updater final : public GarbageCollectedFinalized<Update
r> { | 29 class MODULES_EXPORT Updater final : public GarbageCollectedFinalized<Update
r> { |
28 public: | 30 public: |
29 explicit Updater(PassRefPtr<Context>); | 31 explicit Updater(PassRefPtr<Context>); |
30 ~Updater(); | 32 ~Updater(); |
31 | 33 |
32 // |handle| must not be null and must not be locked. | 34 // |handle| must not be null and must not be locked. |
33 void update(PassOwnPtr<WebDataConsumerHandle> /* handle */); | 35 void update(PassOwnPtr<WebDataConsumerHandle> /* handle */); |
(...skipping 27 matching lines...) Expand all Loading... |
61 const char* debugName() const override { return "CompositeDataConsumerHandle
"; } | 63 const char* debugName() const override { return "CompositeDataConsumerHandle
"; } |
62 | 64 |
63 CompositeDataConsumerHandle(PassOwnPtr<WebDataConsumerHandle>, Updater**); | 65 CompositeDataConsumerHandle(PassOwnPtr<WebDataConsumerHandle>, Updater**); |
64 | 66 |
65 RefPtr<Context> m_context; | 67 RefPtr<Context> m_context; |
66 }; | 68 }; |
67 | 69 |
68 } // namespace blink | 70 } // namespace blink |
69 | 71 |
70 #endif // CompositeDataConsumerHandle_h | 72 #endif // CompositeDataConsumerHandle_h |
OLD | NEW |