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

Unified Diff: services/native_viewport/platform_viewport_android.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
Index: services/native_viewport/platform_viewport_android.cc
diff --git a/services/native_viewport/platform_viewport_android.cc b/services/native_viewport/platform_viewport_android.cc
index f2a5960361dd240670522a8123d80f1a6c830a17..2553783a01bfd0b0e90f389fc9cc3d859f93ae5c 100644
--- a/services/native_viewport/platform_viewport_android.cc
+++ b/services/native_viewport/platform_viewport_android.cc
@@ -25,14 +25,14 @@ mojo::EventType MotionEventActionToEventType(jint action) {
switch (action) {
case AMOTION_EVENT_ACTION_DOWN:
case AMOTION_EVENT_ACTION_POINTER_DOWN:
- return mojo::EVENT_TYPE_POINTER_DOWN;
+ return mojo::EventType::POINTER_DOWN;
case AMOTION_EVENT_ACTION_UP:
case AMOTION_EVENT_ACTION_POINTER_UP:
- return mojo::EVENT_TYPE_POINTER_UP;
+ return mojo::EventType::POINTER_UP;
case AMOTION_EVENT_ACTION_MOVE:
- return mojo::EVENT_TYPE_POINTER_MOVE;
+ return mojo::EventType::POINTER_MOVE;
case AMOTION_EVENT_ACTION_CANCEL:
- return mojo::EVENT_TYPE_POINTER_CANCEL;
+ return mojo::EventType::POINTER_CANCEL;
case AMOTION_EVENT_ACTION_OUTSIDE:
case AMOTION_EVENT_ACTION_HOVER_MOVE:
case AMOTION_EVENT_ACTION_SCROLL:
@@ -41,7 +41,7 @@ mojo::EventType MotionEventActionToEventType(jint action) {
default:
NOTIMPLEMENTED() << "Unimplemented motion action: " << action;
}
- return mojo::EVENT_TYPE_UNKNOWN;
+ return mojo::EventType::UNKNOWN;
}
} // namespace
@@ -138,7 +138,7 @@ bool PlatformViewportAndroid::TouchEvent(JNIEnv* env,
(base::TimeTicks() + base::TimeDelta::FromMilliseconds(time_ms))
.ToInternalValue();
event->action = MotionEventActionToEventType(masked_action);
- if (event->action == mojo::EVENT_TYPE_UNKNOWN)
+ if (event->action == mojo::EventType::UNKNOWN)
return false;
event->pointer_data = mojo::PointerData::New();
« no previous file with comments | « services/native_viewport/native_viewport_impl.cc ('k') | services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698