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

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

Issue 23005005: [NaCl SDK] nacl_io: Add initial implementations of kill and signal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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_MOUNT_NODE_TTY_H_ 5 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_TTY_H_
6 #define LIBRARIES_NACL_IO_MOUNT_NODE_TTY_H_ 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_TTY_H_
7 7
8 #include <poll.h> 8 #include <poll.h>
9 #include <pthread.h> 9 #include <pthread.h>
10 10
(...skipping 29 matching lines...) Expand all
40 const struct termios *termios_p); 40 const struct termios *termios_p);
41 41
42 virtual uint32_t GetEventStatus() { 42 virtual uint32_t GetEventStatus() {
43 uint32_t status = POLLOUT; 43 uint32_t status = POLLOUT;
44 if (is_readable_) 44 if (is_readable_)
45 status |= POLLIN; 45 status |= POLLIN;
46 return status; 46 return status;
47 } 47 }
48 48
49 private: 49 private:
50 virtual Error Write(size_t offs, 50 Error WriteWithLock(size_t offs,
51 const void* buf, 51 const void* buf,
52 size_t count, 52 size_t count,
53 int* out_bytes, 53 int* out_bytes);
54 bool locked);
55 Error ProcessInput(struct tioc_nacl_input_string* message); 54 Error ProcessInput(struct tioc_nacl_input_string* message);
56 Error Echo(const char* string, int count); 55 Error Echo(const char* string, int count);
57 void InitTermios(); 56 void InitTermios();
58 57
59 std::deque<char> input_buffer_; 58 std::deque<char> input_buffer_;
60 bool is_readable_; 59 bool is_readable_;
60 bool did_resize_;
61 pthread_cond_t is_readable_cond_; 61 pthread_cond_t is_readable_cond_;
62 std::string prefix_;
63 struct termios termios_; 62 struct termios termios_;
63 nacl_io_tty_output_handler_t output_handler_;
64 /// Current height of terminal in rows.
65 int rows_;
66 /// Current width of terminal in columns.
67 int cols_;
64 }; 68 };
65 69
66 } 70 }
67 71
68 #endif 72 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698