| Index: content/child/shared_memory_data_consumer_handle.h
|
| diff --git a/content/child/shared_memory_data_consumer_handle.h b/content/child/shared_memory_data_consumer_handle.h
|
| index 6d74178f5cda317e5fdc1e0c6e85e5d92756ad25..cd6e34ed0df562d94d38ae56bcadd16e179557fa 100644
|
| --- a/content/child/shared_memory_data_consumer_handle.h
|
| +++ b/content/child/shared_memory_data_consumer_handle.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_
|
| #define CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_
|
|
|
| +#include "base/callback.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "content/common/content_export.h"
|
| @@ -57,9 +58,19 @@ class CONTENT_EXPORT SharedMemoryDataConsumerHandle final
|
| scoped_refptr<Context> context_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ReaderImpl);
|
| - };
|
| + };
|
|
|
| + // Creates a handle and a writer associated with the handle. The created
|
| + // writer should be used on the calling thread.
|
| + SharedMemoryDataConsumerHandle(BackpressureMode mode,
|
| + scoped_ptr<Writer>* writer);
|
| + // |on_reader_detached| will be called aynchronously on the calling thread
|
| + // when the reader (including the handle) is detached (i.e. both the handle
|
| + // and the reader are destructed). The callback will be reset in the internal
|
| + // context when the writer is detached, i.e. |Close| or |Fail| is called,
|
| + // and the callback will never be called.
|
| SharedMemoryDataConsumerHandle(BackpressureMode mode,
|
| + const base::Closure& on_reader_detached,
|
| scoped_ptr<Writer>* writer);
|
| virtual ~SharedMemoryDataConsumerHandle();
|
|
|
|
|