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

Side by Side Diff: mojo/system/data_pipe.h

Issue 231353002: Make mojo_system static and mojo_system_impl a component, never use both (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the mac loader path dependencies Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « mojo/system/core_unittest.cc ('k') | mojo/system/dispatcher.h » ('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 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_SYSTEM_DATA_PIPE_H_ 5 #ifndef MOJO_SYSTEM_DATA_PIPE_H_
6 #define MOJO_SYSTEM_DATA_PIPE_H_ 6 #define MOJO_SYSTEM_DATA_PIPE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/synchronization/lock.h" 11 #include "base/synchronization/lock.h"
12 #include "mojo/public/c/system/core.h" 12 #include "mojo/public/c/system/core.h"
13 #include "mojo/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 class Waiter; 18 class Waiter;
19 class WaiterList; 19 class WaiterList;
20 20
21 // |DataPipe| is a base class for secondary objects implementing data pipes, 21 // |DataPipe| is a base class for secondary objects implementing data pipes,
22 // similar to |MessagePipe| (see the explanatory comment in core_impl.cc). It is 22 // similar to |MessagePipe| (see the explanatory comment in core.cc). It is
23 // typically owned by the dispatcher(s) corresponding to the local endpoints. 23 // typically owned by the dispatcher(s) corresponding to the local endpoints.
24 // Its subclasses implement the three cases: local producer and consumer, local 24 // Its subclasses implement the three cases: local producer and consumer, local
25 // producer and remote consumer, and remote producer and local consumer. This 25 // producer and remote consumer, and remote producer and local consumer. This
26 // class is thread-safe. 26 // class is thread-safe.
27 class MOJO_SYSTEM_IMPL_EXPORT DataPipe : 27 class MOJO_SYSTEM_IMPL_EXPORT DataPipe :
28 public base::RefCountedThreadSafe<DataPipe> { 28 public base::RefCountedThreadSafe<DataPipe> {
29 public: 29 public:
30 // Validates and/or sets default options. If non-null, |in_options| must point 30 // Validates and/or sets default options. If non-null, |in_options| must point
31 // to a struct of at least |in_options->struct_size| bytes. |out_options| must 31 // to a struct of at least |in_options->struct_size| bytes. |out_options| must
32 // point to a (current) |MojoCreateDataPipeOptions| and will be entirely 32 // point to a (current) |MojoCreateDataPipeOptions| and will be entirely
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 uint32_t producer_two_phase_max_num_bytes_written_; 185 uint32_t producer_two_phase_max_num_bytes_written_;
186 uint32_t consumer_two_phase_max_num_bytes_read_; 186 uint32_t consumer_two_phase_max_num_bytes_read_;
187 187
188 DISALLOW_COPY_AND_ASSIGN(DataPipe); 188 DISALLOW_COPY_AND_ASSIGN(DataPipe);
189 }; 189 };
190 190
191 } // namespace system 191 } // namespace system
192 } // namespace mojo 192 } // namespace mojo
193 193
194 #endif // MOJO_SYSTEM_DATA_PIPE_H_ 194 #endif // MOJO_SYSTEM_DATA_PIPE_H_
OLDNEW
« no previous file with comments | « mojo/system/core_unittest.cc ('k') | mojo/system/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698