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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/event_emitter_tty.h

Issue 26703008: [NaCl SDK] nacl_io: Add support for non-blocking connect/accept (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_EVENT_EMITTER_TTY_H_ 5 #ifndef LIBRARIES_NACL_IO_EVENT_EMITTER_TTY_H_
6 #define LIBRARIES_NACL_IO_EVENT_EMITTER_TTY_H_ 6 #define LIBRARIES_NACL_IO_EVENT_EMITTER_TTY_H_
7 7
8 #include <poll.h> 8 #include <poll.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
(...skipping 10 matching lines...) Expand all
21 class EventEmitterTTY; 21 class EventEmitterTTY;
22 typedef sdk_util::ScopedRef<EventEmitterTTY> ScopedEventEmitterTTY; 22 typedef sdk_util::ScopedRef<EventEmitterTTY> ScopedEventEmitterTTY;
23 23
24 class EventEmitterTTY : public EventEmitterStream { 24 class EventEmitterTTY : public EventEmitterStream {
25 public: 25 public:
26 explicit EventEmitterTTY(size_t size); 26 explicit EventEmitterTTY(size_t size);
27 27
28 size_t Read_Locked(char* data, size_t len); 28 size_t Read_Locked(char* data, size_t len);
29 size_t Write_Locked(const char* data, size_t len); 29 size_t Write_Locked(const char* data, size_t len);
30 30
31 protected:
31 virtual FIFOChar* in_fifo() { return &fifo_; } 32 virtual FIFOChar* in_fifo() { return &fifo_; }
32 virtual FIFONull* out_fifo() { return &null_; } 33 virtual FIFONull* out_fifo() { return &null_; }
33 34
34 private: 35 private:
35 FIFOChar fifo_; 36 FIFOChar fifo_;
36 FIFONull null_; 37 FIFONull null_;
37 DISALLOW_COPY_AND_ASSIGN(EventEmitterTTY); 38 DISALLOW_COPY_AND_ASSIGN(EventEmitterTTY);
38 }; 39 };
39 40
40 } // namespace nacl_io 41 } // namespace nacl_io
41 42
42 #endif // LIBRARIES_NACL_IO_EVENT_EMITTER_PIPE_H_ 43 #endif // LIBRARIES_NACL_IO_EVENT_EMITTER_PIPE_H_
43 44
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698