| 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 CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ | 5 #ifndef CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ |
| 6 #define CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ | 6 #define CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/public/child/request_peer.h" | 11 #include "content/public/child/request_peer.h" |
| 12 #include "third_party/WebKit/public/platform/WebDataConsumerHandle.h" | 12 #include "third_party/WebKit/public/platform/WebDataConsumerHandle.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 // This class is a WebDataConsumerHandle that accepts RequestPeer::ReceivedData. | 16 // This class is a WebDataConsumerHandle that accepts RequestPeer::ReceivedData. |
| 17 // TODO(yhirano): Currently this only works on a single thread. Make this class | |
| 18 // work with a multi thread environment. | |
| 19 class CONTENT_EXPORT SharedMemoryDataConsumerHandle final | 17 class CONTENT_EXPORT SharedMemoryDataConsumerHandle final |
| 20 : public NON_EXPORTED_BASE(blink::WebDataConsumerHandle) { | 18 : public NON_EXPORTED_BASE(blink::WebDataConsumerHandle) { |
| 21 private: | 19 private: |
| 22 class Context; | 20 class Context; |
| 23 | 21 |
| 24 public: | 22 public: |
| 25 enum BackpressureMode { | 23 enum BackpressureMode { |
| 26 kApplyBackpressure, | 24 kApplyBackpressure, |
| 27 kDoNotApplyBackpressure, | 25 kDoNotApplyBackpressure, |
| 28 }; | 26 }; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 53 | 51 |
| 54 private: | 52 private: |
| 55 scoped_refptr<Context> context_; | 53 scoped_refptr<Context> context_; |
| 56 | 54 |
| 57 DISALLOW_COPY_AND_ASSIGN(SharedMemoryDataConsumerHandle); | 55 DISALLOW_COPY_AND_ASSIGN(SharedMemoryDataConsumerHandle); |
| 58 }; | 56 }; |
| 59 | 57 |
| 60 } // namespace content | 58 } // namespace content |
| 61 | 59 |
| 62 #endif // CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ | 60 #endif // CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ |
| OLD | NEW |