Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Side by Side Diff: content/child/shared_memory_data_consumer_handle.h

Issue 1144033002: Make SharedMemoryDataConsumerHandle thread-safe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc-data-consumer
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/child/shared_memory_data_consumer_handle.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/child/shared_memory_data_consumer_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698