| 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" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // Returns a handle and stores the associated updater to |*updater|. The | 45 // Returns a handle and stores the associated updater to |*updater|. The |
| 46 // associated updater will be bound to the calling thread. | 46 // associated updater will be bound to the calling thread. |
| 47 // |handle| must not be null and must not be locked. | 47 // |handle| must not be null and must not be locked. |
| 48 template<typename T> | 48 template<typename T> |
| 49 static PassOwnPtr<WebDataConsumerHandle> create(PassOwnPtr<WebDataConsumerHa
ndle> handle, T* updater) | 49 static PassOwnPtr<WebDataConsumerHandle> create(PassOwnPtr<WebDataConsumerHa
ndle> handle, T* updater) |
| 50 { | 50 { |
| 51 ASSERT(handle); | 51 ASSERT(handle); |
| 52 Updater* u = nullptr; | 52 Updater* u = nullptr; |
| 53 OwnPtr<CompositeDataConsumerHandle> p = adoptPtr(new CompositeDataConsum
erHandle(std::move(handle), &u)); | 53 OwnPtr<CompositeDataConsumerHandle> p = adoptPtr(new CompositeDataConsum
erHandle(std::move(handle), &u)); |
| 54 *updater = u; | 54 *updater = u; |
| 55 return p.release(); | 55 return std::move(p); |
| 56 } | 56 } |
| 57 ~CompositeDataConsumerHandle() override; | 57 ~CompositeDataConsumerHandle() override; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 class ReaderImpl; | 60 class ReaderImpl; |
| 61 Reader* obtainReaderInternal(Client*) override; | 61 Reader* obtainReaderInternal(Client*) override; |
| 62 | 62 |
| 63 const char* debugName() const override { return "CompositeDataConsumerHandle
"; } | 63 const char* debugName() const override { return "CompositeDataConsumerHandle
"; } |
| 64 | 64 |
| 65 CompositeDataConsumerHandle(PassOwnPtr<WebDataConsumerHandle>, Updater**); | 65 CompositeDataConsumerHandle(PassOwnPtr<WebDataConsumerHandle>, Updater**); |
| 66 | 66 |
| 67 RefPtr<Context> m_context; | 67 RefPtr<Context> m_context; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace blink | 70 } // namespace blink |
| 71 | 71 |
| 72 #endif // CompositeDataConsumerHandle_h | 72 #endif // CompositeDataConsumerHandle_h |
| OLD | NEW |