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

Unified Diff: apps/moterm/moterm_model.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
Index: apps/moterm/moterm_model.cc
diff --git a/apps/moterm/moterm_model.cc b/apps/moterm/moterm_model.cc
index 3b321585b0ab52c10b02cff8cd3330168190b514..d8a59cce7020473de788dd8604c325c192e8cb64 100644
--- a/apps/moterm/moterm_model.cc
+++ b/apps/moterm/moterm_model.cc
@@ -103,8 +103,13 @@ const MotermModel::Attributes MotermModel::kAttributesBlink;
const unsigned MotermModel::kMaxRows;
const unsigned MotermModel::kMaxColumns;
-MotermModel::MotermModel(const Size& max_size, const Size& size)
- : max_size_(max_size), terminal_(), current_state_changes_() {
+MotermModel::MotermModel(const Size& max_size,
+ const Size& size,
+ Delegate* delegate)
+ : max_size_(max_size),
+ delegate_(delegate),
+ terminal_(),
+ current_state_changes_() {
DCHECK_GT(max_size_.rows, 0u);
DCHECK_LE(max_size_.rows, kMaxRows);
DCHECK_GT(max_size_.columns, 0u);
@@ -309,8 +314,10 @@ void MotermModel::OnParam(int cmd, unsigned val) {
}
void MotermModel::OnRespond(const void* buf, size_t size) {
- // TODO(vtl)
- NOTIMPLEMENTED();
+ if (delegate_)
+ delegate_->OnResponse(buf, size);
+ else
+ DLOG(WARNING) << "Ignoring response: no delegate";
}
// static

Powered by Google App Engine
This is Rietveld 408576698