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

Unified Diff: apps/moterm/moterm_view.cc

Issue 1322103006: Moterm: Plumb responses back to the terminal File. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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
« apps/moterm/moterm_model.h ('K') | « apps/moterm/moterm_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/moterm/moterm_view.cc
diff --git a/apps/moterm/moterm_view.cc b/apps/moterm/moterm_view.cc
index 5150d28f860e2d66a679b0afa4bd6a109f88e880..ed45eb0ac76e59b5f823abf3cb2bda4d7cb63ad5 100644
--- a/apps/moterm/moterm_view.cc
+++ b/apps/moterm/moterm_view.cc
@@ -57,7 +57,7 @@ MotermView::MotermView(
kTextureFormat,
false,
RectToSize(view->bounds())),
- model_(MotermModel::Size(240, 160), MotermModel::Size(24, 80)),
+ model_(MotermModel::Size(240, 160), MotermModel::Size(24, 80), this),
frame_pending_(false),
force_next_draw_(false),
ascent_(0),
@@ -135,6 +135,11 @@ void MotermView::OnFrameDisplayed(uint32_t frame_id) {
Draw(false);
}
+void MotermView::OnResponse(const void* buf, size_t size) {
+ if (driver_)
+ driver_->SendData(buf, size);
+}
+
void MotermView::OnDataReceived(const void* bytes, size_t num_bytes) {
model_.ProcessInput(bytes, num_bytes, &model_state_changes_);
Draw(false);
« apps/moterm/moterm_model.h ('K') | « apps/moterm/moterm_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698