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

Unified Diff: chrome/browser/chromeos/process_proxy/process_proxy.cc

Issue 9121035: [hterm:crosh] Add support for terminal window resizing to terminal API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/process_proxy/process_proxy.cc
diff --git a/chrome/browser/chromeos/process_proxy/process_proxy.cc b/chrome/browser/chromeos/process_proxy/process_proxy.cc
index 04b2c3f53a8beeceaf424b0ee05ad7d4ed14d734..a5b3ac9d0974ff45ea9393c2dd50a4aa8da440cd 100644
--- a/chrome/browser/chromeos/process_proxy/process_proxy.cc
+++ b/chrome/browser/chromeos/process_proxy/process_proxy.cc
@@ -156,6 +156,19 @@ bool ProcessProxy::Write(const std::string& text) {
return (bytes_written == static_cast<int>(data_size));
}
+bool ProcessProxy::OnTerminalResize(int width, int height) {
+ if (width < 0 || height < 0)
tbarzic 2012/01/27 04:14:27 we might check upper bound, too (but I'm not sure
rginda 2012/02/06 22:49:43 I'm not sure it makes sense to set an upper bound.
+ return false;
+
+ winsize ws;
+ // Number of rows.
+ ws.ws_row = height;
+ // Number of columns.
+ ws.ws_col = width;
+
+ return (HANDLE_EINTR(ioctl(pt_pair_[PT_MASTER_FD], TIOCSWINSZ, &ws)) != -1);
+}
+
ProcessProxy::~ProcessProxy() {
// In case watcher did not started, we may get deleted without calling Close.
// In that case we have to clean up created pipes. If watcher had been
« no previous file with comments | « chrome/browser/chromeos/process_proxy/process_proxy.h ('k') | chrome/browser/chromeos/process_proxy/process_proxy_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698