OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 MOJO_EDK_SYSTEM_LOCAL_DATA_PIPE_H_ | 5 #ifndef MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ |
6 #define MOJO_EDK_SYSTEM_LOCAL_DATA_PIPE_H_ | 6 #define MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/aligned_memory.h" | 9 #include "base/memory/aligned_memory.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "mojo/edk/system/data_pipe.h" | 12 #include "mojo/system/data_pipe.h" |
13 #include "mojo/edk/system/system_impl_export.h" | 13 #include "mojo/system/system_impl_export.h" |
14 | 14 |
15 namespace mojo { | 15 namespace mojo { |
16 namespace system { | 16 namespace system { |
17 | 17 |
18 // |LocalDataPipe| is a subclass that "implements" |DataPipe| for data pipes | 18 // |LocalDataPipe| is a subclass that "implements" |DataPipe| for data pipes |
19 // whose producer and consumer are both local. This class is thread-safe (with | 19 // whose producer and consumer are both local. This class is thread-safe (with |
20 // protection provided by |DataPipe|'s |lock_|. | 20 // protection provided by |DataPipe|'s |lock_|. |
21 class MOJO_SYSTEM_IMPL_EXPORT LocalDataPipe : public DataPipe { | 21 class MOJO_SYSTEM_IMPL_EXPORT LocalDataPipe : public DataPipe { |
22 public: | 22 public: |
23 // |validated_options| should be the output of |DataPipe::ValidateOptions()|. | 23 // |validated_options| should be the output of |DataPipe::ValidateOptions()|. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Circular buffer. | 82 // Circular buffer. |
83 size_t start_index_; | 83 size_t start_index_; |
84 size_t current_num_bytes_; | 84 size_t current_num_bytes_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(LocalDataPipe); | 86 DISALLOW_COPY_AND_ASSIGN(LocalDataPipe); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace system | 89 } // namespace system |
90 } // namespace mojo | 90 } // namespace mojo |
91 | 91 |
92 #endif // MOJO_EDK_SYSTEM_LOCAL_DATA_PIPE_H_ | 92 #endif // MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ |
OLD | NEW |