| 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 LIBRARIES_NACL_IO_STREAM_STREAM_H_ | 5 #ifndef LIBRARIES_NACL_IO_STREAM_STREAM_H_ |
| 6 #define LIBRARIES_NACL_IO_STREAM_STREAM_H_ | 6 #define LIBRARIES_NACL_IO_STREAM_STREAM_H_ |
| 7 | 7 |
| 8 #include "nacl_io/filesystem.h" | 8 #include "nacl_io/filesystem.h" |
| 9 | 9 |
| 10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
| 11 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
| 12 | 12 |
| 13 namespace nacl_io { | 13 namespace nacl_io { |
| 14 | 14 |
| 15 // StreamFs provides a "mount point" for stream objects which do not provide a | 15 // StreamFs provides a "mount point" for stream objects which do not provide a |
| 16 // path, such as FDs returned by pipe, socket, and sockpair. It also provides | 16 // path, such as FDs returned by pipe, socket, and sockpair. It also provides |
| 17 // a background thread for dispatching completion callbacks. | 17 // a background thread for dispatching completion callbacks. |
| 18 | 18 |
| 19 class StreamFs; | 19 class StreamFs; |
| 20 class StreamNode; | |
| 21 | 20 |
| 22 class StreamFs : public Filesystem { | 21 class StreamFs : public Filesystem { |
| 23 public: | 22 public: |
| 24 class Work { | 23 class Work { |
| 25 public: | 24 public: |
| 26 explicit Work(StreamFs* filesystem) : filesystem_(filesystem) {} | 25 explicit Work(StreamFs* filesystem) : filesystem_(filesystem) {} |
| 27 virtual ~Work() {} | 26 virtual ~Work() {} |
| 28 | 27 |
| 29 // Called by adding work the queue, val should be safe to ignore. | 28 // Called by adding work the queue, val should be safe to ignore. |
| 30 virtual bool Start(int32_t val) = 0; | 29 virtual bool Start(int32_t val) = 0; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 pthread_cond_t message_cond_; | 69 pthread_cond_t message_cond_; |
| 71 sdk_util::SimpleLock message_lock_; | 70 sdk_util::SimpleLock message_lock_; |
| 72 | 71 |
| 73 friend class KernelProxy; | 72 friend class KernelProxy; |
| 74 DISALLOW_COPY_AND_ASSIGN(StreamFs); | 73 DISALLOW_COPY_AND_ASSIGN(StreamFs); |
| 75 }; | 74 }; |
| 76 | 75 |
| 77 } // namespace nacl_io | 76 } // namespace nacl_io |
| 78 | 77 |
| 79 #endif // LIBRARIES_NACL_IO_STREAM_STREAM_H_ | 78 #endif // LIBRARIES_NACL_IO_STREAM_STREAM_H_ |
| OLD | NEW |