| OLD | NEW |
| 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 #ifndef WebDataConsumerHandle_h | 5 #ifndef WebDataConsumerHandle_h |
| 6 #define WebDataConsumerHandle_h | 6 #define WebDataConsumerHandle_h |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #if INSIDE_BLINK | 10 #if INSIDE_BLINK |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // handle is not locked. |client| can be null. Otherwise, |*client| must be | 106 // handle is not locked. |client| can be null. Otherwise, |*client| must be |
| 107 // valid as long as the reader is valid. The returned reader is bound to | 107 // valid as long as the reader is valid. The returned reader is bound to |
| 108 // the calling thread and client notification will be called on the thread | 108 // the calling thread and client notification will be called on the thread |
| 109 // if |client| is not null. | 109 // if |client| is not null. |
| 110 // If |client| is not null and the handle is not waiting, client | 110 // If |client| is not null and the handle is not waiting, client |
| 111 // notification is called asynchronously. | 111 // notification is called asynchronously. |
| 112 #if INSIDE_BLINK | 112 #if INSIDE_BLINK |
| 113 PassOwnPtr<Reader> obtainReader(Client* client) { return adoptPtr(obtainRead
erInternal(client)); } | 113 PassOwnPtr<Reader> obtainReader(Client* client) { return adoptPtr(obtainRead
erInternal(client)); } |
| 114 #endif | 114 #endif |
| 115 | 115 |
| 116 // Returns a string literal (e.g. class name) for debugging only. |
| 117 virtual const char* debugName() const { return "WebDataConsumerHandle"; } |
| 118 |
| 116 private: | 119 private: |
| 117 // The caller takes ownership of the returned object. | 120 // The caller takes ownership of the returned object. |
| 118 virtual Reader* obtainReaderInternal(Client* client) | 121 virtual Reader* obtainReaderInternal(Client* client) |
| 119 { | 122 { |
| 120 BLINK_ASSERT_NOT_REACHED(); | 123 BLINK_ASSERT_NOT_REACHED(); |
| 121 return nullptr; | 124 return nullptr; |
| 122 } | 125 } |
| 123 | 126 |
| 124 // Below are deprecated functions that will be removed shortly. Use Reader | 127 // Below are deprecated functions that will be removed shortly. Use Reader |
| 125 // instead. | 128 // instead. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 151 // Only one registration can be made for a handle at a time. | 154 // Only one registration can be made for a handle at a time. |
| 152 virtual void registerClient(Client* /* client */) { } | 155 virtual void registerClient(Client* /* client */) { } |
| 153 | 156 |
| 154 // Unregisters |client| from this handle. | 157 // Unregisters |client| from this handle. |
| 155 virtual void unregisterClient() { } | 158 virtual void unregisterClient() { } |
| 156 }; | 159 }; |
| 157 | 160 |
| 158 } // namespace blink | 161 } // namespace blink |
| 159 | 162 |
| 160 #endif // WebDataConsumerHandle_h | 163 #endif // WebDataConsumerHandle_h |
| OLD | NEW |