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

Unified Diff: examples/spinning_cube/gles2_client_impl.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 | « examples/pdf_viewer/pdf_viewer.cc ('k') | examples/window_manager/window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/spinning_cube/gles2_client_impl.cc
diff --git a/examples/spinning_cube/gles2_client_impl.cc b/examples/spinning_cube/gles2_client_impl.cc
index b4ce5230ab56f07e7ebe1bf9e6dc880323b0a5af..dfbf209baeaaa1f07240dd87fb0f41bded1ff134 100644
--- a/examples/spinning_cube/gles2_client_impl.cc
+++ b/examples/spinning_cube/gles2_client_impl.cc
@@ -77,8 +77,8 @@ void GLES2ClientImpl::SetSize(const mojo::Size& size) {
void GLES2ClientImpl::HandleInputEvent(const mojo::Event& event) {
switch (event.action) {
- case mojo::EVENT_TYPE_POINTER_DOWN:
- if (event.flags & mojo::EVENT_FLAGS_RIGHT_MOUSE_BUTTON)
+ case mojo::EventType::POINTER_DOWN:
+ if (event.flags & mojo::EventFlags::RIGHT_MOUSE_BUTTON)
break;
capture_point_.x = event.pointer_data->x;
capture_point_.y = event.pointer_data->y;
@@ -86,9 +86,9 @@ void GLES2ClientImpl::HandleInputEvent(const mojo::Event& event) {
drag_start_time_ = mojo::GetTimeTicksNow();
cube_.SetFlingMultiplier(0.0f, 1.0f);
break;
- case mojo::EVENT_TYPE_POINTER_MOVE: {
- if (!(event.flags & mojo::EVENT_FLAGS_LEFT_MOUSE_BUTTON) &&
- event.pointer_data->kind == mojo::POINTER_KIND_MOUSE) {
+ case mojo::EventType::POINTER_MOVE: {
+ if (!(event.flags & mojo::EventFlags::LEFT_MOUSE_BUTTON) &&
+ event.pointer_data->kind == mojo::PointerKind::MOUSE) {
break;
}
mojo::PointF event_location;
@@ -104,8 +104,8 @@ void GLES2ClientImpl::HandleInputEvent(const mojo::Event& event) {
last_drag_point_ = event_location;
break;
}
- case mojo::EVENT_TYPE_POINTER_UP: {
- if (event.flags & mojo::EVENT_FLAGS_RIGHT_MOUSE_BUTTON) {
+ case mojo::EventType::POINTER_UP: {
+ if (event.flags & mojo::EventFlags::RIGHT_MOUSE_BUTTON) {
cube_.set_color(GetRandomColor(), GetRandomColor(), GetRandomColor());
break;
}
« no previous file with comments | « examples/pdf_viewer/pdf_viewer.cc ('k') | examples/window_manager/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698