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

Unified Diff: services/keyboard_native/view_observer_delegate.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/keyboard_native/view_observer_delegate.cc
diff --git a/services/keyboard_native/view_observer_delegate.cc b/services/keyboard_native/view_observer_delegate.cc
index db69ea5e94a8ad128303c03bdf8759645281dff7..f1229761ffe1c45c02dc0001c8c0ea56a0b2e2db 100644
--- a/services/keyboard_native/view_observer_delegate.cc
+++ b/services/keyboard_native/view_observer_delegate.cc
@@ -141,11 +141,11 @@ void ViewObserverDelegate::UpdateState(int32 pointer_id,
} else {
it2->second->last_point = touch_point;
}
- it2->second->last_point_valid = action != mojo::EVENT_TYPE_POINTER_UP;
+ it2->second->last_point_valid = action != mojo::EventType::POINTER_UP;
}
- if (action == mojo::EVENT_TYPE_POINTER_UP ||
- action == mojo::EVENT_TYPE_POINTER_DOWN) {
+ if (action == mojo::EventType::POINTER_UP ||
+ action == mojo::EventType::POINTER_DOWN) {
animations_.push_back(make_scoped_ptr(new MaterialSplashAnimation(
current_ticks, kAnimationDurationMs, touch_point)));
}
@@ -336,12 +336,12 @@ void ViewObserverDelegate::OnViewInputEvent(mojo::View* view,
if (event->pointer_data) {
gfx::PointF point(event->pointer_data->x, event->pointer_data->y);
- if (event->action == mojo::EVENT_TYPE_POINTER_UP) {
+ if (event->action == mojo::EventType::POINTER_UP) {
key_layout_.OnTouchUp(point);
}
- if (event->action == mojo::EVENT_TYPE_POINTER_DOWN ||
- event->action == mojo::EVENT_TYPE_POINTER_UP) {
+ if (event->action == mojo::EventType::POINTER_DOWN ||
+ event->action == mojo::EventType::POINTER_UP) {
auto it =
std::find(active_pointer_ids_.begin(), active_pointer_ids_.end(),
event->pointer_data->pointer_id);
@@ -353,7 +353,7 @@ void ViewObserverDelegate::OnViewInputEvent(mojo::View* view,
if (it2 != active_pointer_state_.end()) {
active_pointer_state_.erase(it2);
}
- if (event->action == mojo::EVENT_TYPE_POINTER_DOWN) {
+ if (event->action == mojo::EventType::POINTER_DOWN) {
active_pointer_ids_.push_back(event->pointer_data->pointer_id);
PointerState* pointer_state = new PointerState();
pointer_state->last_key = nullptr;
« no previous file with comments | « services/http_server/http_server_factory_impl.cc ('k') | services/native_support/process_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698