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

Unified Diff: apps/moterm/moterm_view.cc

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « apps/moterm/moterm_driver_unittest.cc ('k') | examples/bitmap_uploader/bitmap_uploader.cc » ('j') | 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 fc39c2fe0c34a7698bc7ccc037eb344c713e3156..35acabc19f0f50ffeb4624f9ebab155b720991e5 100644
--- a/apps/moterm/moterm_view.cc
+++ b/apps/moterm/moterm_view.cc
@@ -118,7 +118,7 @@ void MotermView::OnViewBoundsChanged(mojo::View* view,
void MotermView::OnViewInputEvent(mojo::View* view,
const mojo::EventPtr& event) {
- if (event->action == mojo::EVENT_TYPE_KEY_PRESSED)
+ if (event->action == mojo::EventType::KEY_PRESSED)
OnKeyPressed(event);
}
@@ -183,14 +183,14 @@ void MotermView::Connect(
OnClosed();
} else {
// TODO(vtl): Is this error code right?
- callback.Run(mojo::files::ERROR_UNAVAILABLE);
+ callback.Run(mojo::files::Error::UNAVAILABLE);
return;
}
}
driver_ = MotermDriver::Create(this, terminal_file.Pass());
DCHECK(on_closed_callback_.is_null());
- on_closed_callback_ = [callback] { callback.Run(mojo::files::ERROR_OK); };
+ on_closed_callback_ = [callback] { callback.Run(mojo::files::Error::OK); };
}
void MotermView::ConnectToClient(
@@ -203,7 +203,7 @@ void MotermView::ConnectToClient(
OnClosed();
} else {
// TODO(vtl): Is this error code right?
- callback.Run(mojo::files::ERROR_UNAVAILABLE);
+ callback.Run(mojo::files::Error::UNAVAILABLE);
return;
}
}
@@ -212,12 +212,12 @@ void MotermView::ConnectToClient(
driver_ = MotermDriver::Create(this, GetProxy(&file));
terminal_client->ConnectToTerminal(file.Pass());
DCHECK(on_closed_callback_.is_null());
- on_closed_callback_ = [callback] { callback.Run(mojo::files::ERROR_OK); };
+ on_closed_callback_ = [callback] { callback.Run(mojo::files::Error::OK); };
}
void MotermView::GetSize(const GetSizeCallback& callback) {
MotermModel::Size size = model_.GetSize();
- callback.Run(mojo::files::ERROR_OK, size.rows, size.columns);
+ callback.Run(mojo::files::Error::OK, size.rows, size.columns);
}
void MotermView::SetSize(uint32_t rows,
@@ -237,7 +237,7 @@ void MotermView::SetSize(uint32_t rows,
}
model_.SetSize(MotermModel::Size(rows, columns), reset);
- callback.Run(mojo::files::ERROR_OK, rows, columns);
+ callback.Run(mojo::files::Error::OK, rows, columns);
Draw(false);
}
« no previous file with comments | « apps/moterm/moterm_driver_unittest.cc ('k') | examples/bitmap_uploader/bitmap_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698