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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/pipe/pipe_node.h

Issue 242533005: [NaCl SDK] nacl_io: Add flow control the JavaScript pipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
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 LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_ 5 #ifndef LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_
6 #define LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_ 6 #define LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "nacl_io/pipe/pipe_event_emitter.h" 11 #include "nacl_io/pipe/pipe_event_emitter.h"
12 #include "nacl_io/stream/stream_node.h" 12 #include "nacl_io/stream/stream_node.h"
13 13
14 namespace nacl_io { 14 namespace nacl_io {
15 15
16 class PipeNode : public StreamNode { 16 class PipeNode : public StreamNode {
17 public: 17 public:
18 explicit PipeNode(Filesystem* fs); 18 explicit PipeNode(Filesystem* fs);
19 19
20 virtual EventEmitter* GetEventEmitter(); 20 virtual PipeEventEmitter* GetEventEmitter();
21 virtual Error Read(const HandleAttr& attr, 21 virtual Error Read(const HandleAttr& attr,
22 void* buf, 22 void* buf,
23 size_t count, 23 size_t count,
24 int* out_bytes); 24 int* out_bytes);
25 virtual Error Write(const HandleAttr& attr, 25 virtual Error Write(const HandleAttr& attr,
26 const void* buf, 26 const void* buf,
27 size_t count, 27 size_t count,
28 int* out_bytes); 28 int* out_bytes);
29 29
30 protected: 30 protected:
31 ScopedPipeEventEmitter pipe_; 31 ScopedPipeEventEmitter pipe_;
32 32
33 friend class KernelProxy; 33 friend class KernelProxy;
34 friend class StreamFs; 34 friend class StreamFs;
35 }; 35 };
36 36
37 } // namespace nacl_io 37 } // namespace nacl_io
38 38
39 #endif // LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_ 39 #endif // LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698