summaryrefslogtreecommitdiffstats
path: root/ui/views/widget
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-17 17:46:04 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-17 17:46:04 +0000
commit538f956734244278d1d82e959bfd2a54a5537cd5 (patch)
tree2bfaaa4aa666e696af9ebab5b4871e8b55004480 /ui/views/widget
parent04bdebfa5c0a7aee88220c20b3b8d483f79a3d12 (diff)
downloadchromium_src-538f956734244278d1d82e959bfd2a54a5537cd5.zip
chromium_src-538f956734244278d1d82e959bfd2a54a5537cd5.tar.gz
chromium_src-538f956734244278d1d82e959bfd2a54a5537cd5.tar.bz2
aura: Gesture event plumbing (skeleton).
Add gesture event plumbing through aura. This is not functional just yet. Subsequent CLs will move the gesture-recognizer from views into aura, which will then generate and deliver aura gesture events. BUG=11024 TEST=no functional changes yet. Tests will be added when GR is moved into aura. Review URL: https://chromiumcodereview.appspot.com/9221014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117911 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/widget')
-rw-r--r--ui/views/widget/native_widget_aura.cc6
-rw-r--r--ui/views/widget/native_widget_aura.h1
-rw-r--r--ui/views/widget/root_view.cc10
3 files changed, 12 insertions, 5 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 16c1d7a..f997344 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -673,6 +673,12 @@ ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) {
return delegate_->OnTouchEvent(touch_event);
}
+ui::GestureStatus NativeWidgetAura::OnGestureEvent(aura::GestureEvent* event) {
+ DCHECK(window_->IsVisible());
+ // TODO(sad):
+ return ui::GESTURE_STATUS_UNKNOWN;
+}
+
bool NativeWidgetAura::CanFocus() {
return can_activate_;
}
diff --git a/ui/views/widget/native_widget_aura.h b/ui/views/widget/native_widget_aura.h
index 9f7ca18..78d9c58 100644
--- a/ui/views/widget/native_widget_aura.h
+++ b/ui/views/widget/native_widget_aura.h
@@ -135,6 +135,7 @@ class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate,
virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE;
virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE;
virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE;
+ virtual ui::GestureStatus OnGestureEvent(aura::GestureEvent* event) OVERRIDE;
virtual bool CanFocus() OVERRIDE;
virtual void OnCaptureLost() OVERRIDE;
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index a8f4ef6..f6ac343 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -414,17 +414,17 @@ ui::GestureStatus RootView::OnGestureEvent(const GestureEvent& event) {
// The view could have removed itself from the tree when handling
// OnGestureEvent(). So handle as per OnMousePressed. NB: we
// assume that the RootView itself cannot be so removed.
- if (!gesture_handling_view_) return ui::GESTURE_STATUS_UNKNOWN;
+ if (!gesture_handling_view_)
+ return ui::GESTURE_STATUS_UNKNOWN;
// The gesture event wasn't processed. Go up the view hierarchy and
// dispatch the gesture event.
- if (status == ui::GESTURE_STATUS_UNKNOWN) {
+ if (status == ui::GESTURE_STATUS_UNKNOWN)
continue;
- } else if (status == ui::GESTURE_STATUS_CONSUMED) {
+ else if (status == ui::GESTURE_STATUS_CONSUMED)
return status;
- } else {
+ else
return ui::GESTURE_STATUS_UNKNOWN;
- }
}
return status;
}