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

Unified Diff: mojo/examples/sample_app/gles2_client_impl.cc

Issue 413633003: Mojo: Introduces mojo::EventType and mojo::EventFlags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 6 years, 5 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 | « mojo/examples/sample_app/DEPS ('k') | mojo/examples/window_manager/window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/sample_app/gles2_client_impl.cc
diff --git a/mojo/examples/sample_app/gles2_client_impl.cc b/mojo/examples/sample_app/gles2_client_impl.cc
index d0b0c900f7daa4636e4964968ff725188881c5d6..c62b47fe426aaa3658a8b3a8468164d90b8513aa 100644
--- a/mojo/examples/sample_app/gles2_client_impl.cc
+++ b/mojo/examples/sample_app/gles2_client_impl.cc
@@ -10,7 +10,6 @@
#include <stdlib.h>
#include "mojo/public/c/gles2/gles2.h"
-#include "ui/events/event_constants.h"
namespace examples {
namespace {
@@ -50,18 +49,18 @@ void GLES2ClientImpl::SetSize(const mojo::Size& size) {
void GLES2ClientImpl::HandleInputEvent(const mojo::Event& event) {
switch (event.action) {
- case ui::ET_MOUSE_PRESSED:
- case ui::ET_TOUCH_PRESSED:
- if (event.flags & ui::EF_RIGHT_MOUSE_BUTTON)
+ case mojo::EVENT_TYPE_MOUSE_PRESSED:
+ case mojo::EVENT_TYPE_TOUCH_PRESSED:
+ if (event.flags & mojo::EVENT_FLAGS_RIGHT_MOUSE_BUTTON)
break;
CancelAnimationFrames();
capture_point_ = *event.location;
last_drag_point_ = capture_point_;
drag_start_time_ = mojo::GetTimeTicksNow();
break;
- case ui::ET_MOUSE_DRAGGED:
- case ui::ET_TOUCH_MOVED:
- if (event.flags & ui::EF_RIGHT_MOUSE_BUTTON)
+ case mojo::EVENT_TYPE_MOUSE_DRAGGED:
+ case mojo::EVENT_TYPE_TOUCH_MOVED:
+ if (event.flags & mojo::EVENT_FLAGS_RIGHT_MOUSE_BUTTON)
break;
if (!getting_animation_frames_) {
int direction = event.location->y < last_drag_point_.y ||
@@ -75,9 +74,9 @@ void GLES2ClientImpl::HandleInputEvent(const mojo::Event& event) {
last_drag_point_ = *event.location;
}
break;
- case ui::ET_MOUSE_RELEASED:
- case ui::ET_TOUCH_RELEASED: {
- if (event.flags & ui::EF_RIGHT_MOUSE_BUTTON) {
+ case mojo::EVENT_TYPE_MOUSE_RELEASED:
+ case mojo::EVENT_TYPE_TOUCH_RELEASED: {
+ if (event.flags & mojo::EVENT_FLAGS_RIGHT_MOUSE_BUTTON) {
cube_.set_color(GetRandomColor(), GetRandomColor(), GetRandomColor());
break;
}
« no previous file with comments | « mojo/examples/sample_app/DEPS ('k') | mojo/examples/window_manager/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698