summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-20 17:13:08 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-20 17:13:08 +0000
commit2dca2dc97fd303df0c6a1fb11828472ef1c00428 (patch)
tree0c167969ade022b0a6219255feedd0d198bcdede
parent06ad578f489b38c5f4fc9bc08864f3dc0b3dea4e (diff)
downloadchromium_src-2dca2dc97fd303df0c6a1fb11828472ef1c00428.zip
chromium_src-2dca2dc97fd303df0c6a1fb11828472ef1c00428.tar.gz
chromium_src-2dca2dc97fd303df0c6a1fb11828472ef1c00428.tar.bz2
ui: Add default implementations for EventHandler interface.
This allows getting rid of a whole bunch of noop implementations, and makes it easier to add new event types to be dispatched through the EventDispatcher to EventHandlers. BUG=159632 Review URL: https://codereview.chromium.org/11348145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168817 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/accelerators/accelerator_filter.cc16
-rw-r--r--ash/accelerators/accelerator_filter.h4
-rw-r--r--ash/display/mouse_cursor_event_filter.cc17
-rw-r--r--ash/display/mouse_cursor_event_filter.h4
-rw-r--r--ash/drag_drop/drag_drop_controller.cc8
-rw-r--r--ash/drag_drop/drag_drop_controller.h2
-rw-r--r--ash/extended_desktop_unittest.cc16
-rw-r--r--ash/launcher/launcher_tooltip_manager.cc8
-rw-r--r--ash/launcher/launcher_tooltip_manager.h2
-rw-r--r--ash/magnifier/magnification_controller.cc17
-rw-r--r--ash/magnifier/partial_magnification_controller.cc20
-rw-r--r--ash/magnifier/partial_magnification_controller.h4
-rw-r--r--ash/system/tray/tray_event_filter.cc12
-rw-r--r--ash/system/tray/tray_event_filter.h3
-rw-r--r--ash/tooltips/tooltip_controller.cc8
-rw-r--r--ash/tooltips/tooltip_controller.h2
-rw-r--r--ash/touch/touch_observer_hud.cc16
-rw-r--r--ash/touch/touch_observer_hud.h4
-rw-r--r--ash/wm/app_list_controller.cc12
-rw-r--r--ash/wm/app_list_controller.h3
-rw-r--r--ash/wm/event_rewriter_event_filter.cc14
-rw-r--r--ash/wm/event_rewriter_event_filter.h3
-rw-r--r--ash/wm/overlay_event_filter.cc12
-rw-r--r--ash/wm/overlay_event_filter.h3
-rw-r--r--ash/wm/panel_window_event_filter.cc17
-rw-r--r--ash/wm/panel_window_event_filter.h4
-rw-r--r--ash/wm/shelf_layout_manager.cc24
-rw-r--r--ash/wm/system_gesture_event_filter.cc9
-rw-r--r--ash/wm/system_gesture_event_filter.h2
-rw-r--r--ash/wm/system_modal_container_event_filter.cc17
-rw-r--r--ash/wm/system_modal_container_event_filter.h3
-rw-r--r--ash/wm/toplevel_window_event_handler.cc10
-rw-r--r--ash/wm/toplevel_window_event_handler.h2
-rw-r--r--ash/wm/window_cycle_controller.cc21
-rw-r--r--ash/wm/window_modality_controller.cc11
-rw-r--r--ash/wm/window_modality_controller.h2
-rw-r--r--ash/wm/workspace/frame_maximize_button.cc24
-rw-r--r--chrome/browser/ui/views/ash/tab_scrubber.cc16
-rw-r--r--chrome/browser/ui/views/ash/tab_scrubber.h5
-rw-r--r--ui/aura/aura.gyp1
-rw-r--r--ui/aura/root_window_unittest.cc12
-rw-r--r--ui/aura/window_delegate.cc13
-rw-r--r--ui/aura/window_delegate.h3
-rw-r--r--ui/base/events/event_handler.cc35
-rw-r--r--ui/base/events/event_handler.h17
-rw-r--r--ui/ui.gyp1
-rw-r--r--ui/views/corewm/compound_event_filter_unittest.cc16
-rw-r--r--ui/views/corewm/input_method_event_filter.cc16
-rw-r--r--ui/views/corewm/input_method_event_filter.h4
-rw-r--r--ui/views/widget/desktop_aura/x11_window_event_filter.cc16
-rw-r--r--ui/views/widget/desktop_aura/x11_window_event_filter.h4
51 files changed, 45 insertions, 470 deletions
diff --git a/ash/accelerators/accelerator_filter.cc b/ash/accelerators/accelerator_filter.cc
index 69ba103..51c4450 100644
--- a/ash/accelerators/accelerator_filter.cc
+++ b/ash/accelerators/accelerator_filter.cc
@@ -90,21 +90,5 @@ ui::EventResult AcceleratorFilter::OnKeyEvent(ui::KeyEvent* event) {
ui::ER_CONSUMED : ui::ER_UNHANDLED;
}
-ui::EventResult AcceleratorFilter::OnMouseEvent(ui::MouseEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult AcceleratorFilter::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult AcceleratorFilter::OnTouchEvent(ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult AcceleratorFilter::OnGestureEvent(ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
} // namespace internal
} // namespace ash
diff --git a/ash/accelerators/accelerator_filter.h b/ash/accelerators/accelerator_filter.h
index e9ac992..2f125c4 100644
--- a/ash/accelerators/accelerator_filter.h
+++ b/ash/accelerators/accelerator_filter.h
@@ -22,10 +22,6 @@ class ASH_EXPORT AcceleratorFilter : public ui::EventHandler {
// Overridden from ui::EventHandler:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(AcceleratorFilter);
diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc
index 0cb8723..74514a4 100644
--- a/ash/display/mouse_cursor_event_filter.cc
+++ b/ash/display/mouse_cursor_event_filter.cc
@@ -71,10 +71,6 @@ void MouseCursorEventFilter::HideSharedEdgeIndicator() {
shared_display_edge_indicator_->Hide();
}
-ui::EventResult MouseCursorEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult MouseCursorEventFilter::OnMouseEvent(ui::MouseEvent* event) {
// Handle both MOVED and DRAGGED events here because when the mouse pointer
// enters the other root window while dragging, the underlying window system
@@ -91,19 +87,6 @@ ui::EventResult MouseCursorEventFilter::OnMouseEvent(ui::MouseEvent* event) {
ui::ER_CONSUMED : ui::ER_UNHANDLED;
}
-ui::EventResult MouseCursorEventFilter::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult MouseCursorEventFilter::OnTouchEvent(ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult MouseCursorEventFilter::OnGestureEvent(
- ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(
aura::RootWindow* target_root,
const gfx::Point& point_in_screen) {
diff --git a/ash/display/mouse_cursor_event_filter.h b/ash/display/mouse_cursor_event_filter.h
index 48a370d..a1be91c 100644
--- a/ash/display/mouse_cursor_event_filter.h
+++ b/ash/display/mouse_cursor_event_filter.h
@@ -47,11 +47,7 @@ class ASH_EXPORT MouseCursorEventFilter : public ui::EventHandler {
void HideSharedEdgeIndicator();
// Overridden from ui::EventHandler:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private:
FRIEND_TEST_ALL_PREFIXES(MouseCursorEventFilterTest, SetMouseWarpModeFlag);
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 7234b30..da30919 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -230,10 +230,6 @@ ui::EventResult DragDropController::OnMouseEvent(ui::MouseEvent* event) {
return ui::ER_CONSUMED;
}
-ui::EventResult DragDropController::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult DragDropController::OnTouchEvent(ui::TouchEvent* event) {
// TODO(sad): Also check for the touch-id.
// TODO(varunjain): Add code for supporting drag-and-drop across displays
@@ -257,10 +253,6 @@ ui::EventResult DragDropController::OnTouchEvent(ui::TouchEvent* event) {
return ui::ER_CONSUMED;
}
-ui::EventResult DragDropController::OnGestureEvent(ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
void DragDropController::OnWindowDestroyed(aura::Window* window) {
if (drag_window_ == window) {
drag_window_->RemoveObserver(this);
diff --git a/ash/drag_drop/drag_drop_controller.h b/ash/drag_drop/drag_drop_controller.h
index a0e8629..ad897df 100644
--- a/ash/drag_drop/drag_drop_controller.h
+++ b/ash/drag_drop/drag_drop_controller.h
@@ -66,9 +66,7 @@ class ASH_EXPORT DragDropController
// Overridden from ui::EventHandler:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// Overridden from aura::WindowObserver.
virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index 741287b..37b5572 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -89,10 +89,6 @@ class MoveWindowByClickEventFilter : public ui::EventHandler {
private:
// ui::EventHandler overrides:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
if (event->type() == ui::ET_MOUSE_RELEASED) {
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -102,18 +98,6 @@ class MoveWindowByClickEventFilter : public ui::EventHandler {
return ui::ER_UNHANDLED;
}
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
aura::Window* target_;
DISALLOW_COPY_AND_ASSIGN(MoveWindowByClickEventFilter);
};
diff --git a/ash/launcher/launcher_tooltip_manager.cc b/ash/launcher/launcher_tooltip_manager.cc
index a218aba..9768aa8 100644
--- a/ash/launcher/launcher_tooltip_manager.cc
+++ b/ash/launcher/launcher_tooltip_manager.cc
@@ -254,10 +254,6 @@ bool LauncherTooltipManager::IsVisible() {
return widget_ && widget_->IsVisible();
}
-ui::EventResult LauncherTooltipManager::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult LauncherTooltipManager::OnMouseEvent(ui::MouseEvent* event) {
DCHECK(event->target());
DCHECK(event);
@@ -293,10 +289,6 @@ ui::EventResult LauncherTooltipManager::OnMouseEvent(ui::MouseEvent* event) {
return ui::ER_UNHANDLED;
}
-ui::EventResult LauncherTooltipManager::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult LauncherTooltipManager::OnTouchEvent(ui::TouchEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target)
diff --git a/ash/launcher/launcher_tooltip_manager.h b/ash/launcher/launcher_tooltip_manager.h
index 874fa63..5adea3c 100644
--- a/ash/launcher/launcher_tooltip_manager.h
+++ b/ash/launcher/launcher_tooltip_manager.h
@@ -71,9 +71,7 @@ class ASH_EXPORT LauncherTooltipManager : public ui::EventHandler,
protected:
// ui::EventHandler overrides:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc
index 63b0307..4427a11 100644
--- a/ash/magnifier/magnification_controller.cc
+++ b/ash/magnifier/magnification_controller.cc
@@ -117,11 +117,8 @@ class MagnificationControllerImpl : virtual public MagnificationController,
void ValidateScale(float* scale);
// ui::EventHandler overrides:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
aura::RootWindow* root_window_;
@@ -450,10 +447,6 @@ bool MagnificationControllerImpl::IsEnabled() const {
////////////////////////////////////////////////////////////////////////////////
// MagnificationControllerImpl: aura::EventFilter implementation
-ui::EventResult MagnificationControllerImpl::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult MagnificationControllerImpl::OnMouseEvent(
ui::MouseEvent* event) {
if (IsMagnified() && event->type() == ui::ET_MOUSE_MOVED) {
@@ -492,16 +485,6 @@ ui::EventResult MagnificationControllerImpl::OnScrollEvent(
return ui::ER_UNHANDLED;
}
-ui::EventResult MagnificationControllerImpl::OnTouchEvent(
- ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult MagnificationControllerImpl::OnGestureEvent(
- ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
////////////////////////////////////////////////////////////////////////////////
// MagnificationController:
diff --git a/ash/magnifier/partial_magnification_controller.cc b/ash/magnifier/partial_magnification_controller.cc
index 7b682a7..cdabbf2 100644
--- a/ash/magnifier/partial_magnification_controller.cc
+++ b/ash/magnifier/partial_magnification_controller.cc
@@ -76,11 +76,6 @@ void PartialMagnificationController::SetEnabled(bool enabled) {
////////////////////////////////////////////////////////////////////////////////
// PartialMagnificationController: ui::EventHandler implementation
-ui::EventResult PartialMagnificationController::OnKeyEvent(
- ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult PartialMagnificationController::OnMouseEvent(
ui::MouseEvent* event) {
if (IsPartialMagnified() && event->type() == ui::ET_MOUSE_MOVED) {
@@ -100,21 +95,6 @@ ui::EventResult PartialMagnificationController::OnMouseEvent(
return ui::ER_UNHANDLED;
}
-ui::EventResult PartialMagnificationController::OnScrollEvent(
- ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult PartialMagnificationController::OnTouchEvent(
- ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult PartialMagnificationController::OnGestureEvent(
- ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
////////////////////////////////////////////////////////////////////////////////
// PartialMagnificationController: aura::WindowObserver implementation
diff --git a/ash/magnifier/partial_magnification_controller.h b/ash/magnifier/partial_magnification_controller.h
index 7908d97..24e57d3 100644
--- a/ash/magnifier/partial_magnification_controller.h
+++ b/ash/magnifier/partial_magnification_controller.h
@@ -67,11 +67,7 @@ class PartialMagnificationController
void RemoveZoomWidgetObservers();
// ui::EventHandler overrides:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// Overridden from WindowObserver:
virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
diff --git a/ash/system/tray/tray_event_filter.cc b/ash/system/tray/tray_event_filter.cc
index 0c6afc0..01a751b 100644
--- a/ash/system/tray/tray_event_filter.cc
+++ b/ash/system/tray/tray_event_filter.cc
@@ -28,10 +28,6 @@ TrayEventFilter::~TrayEventFilter() {
ash::Shell::GetInstance()->RemovePreTargetHandler(this);
}
-ui::EventResult TrayEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult TrayEventFilter::OnMouseEvent(ui::MouseEvent* event) {
if (event->type() == ui::ET_MOUSE_PRESSED &&
ProcessLocatedEvent(event)) {
@@ -40,10 +36,6 @@ ui::EventResult TrayEventFilter::OnMouseEvent(ui::MouseEvent* event) {
return ui::ER_UNHANDLED;
}
-ui::EventResult TrayEventFilter::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult TrayEventFilter::OnTouchEvent(ui::TouchEvent* event) {
if (event->type() == ui::ET_TOUCH_PRESSED &&
ProcessLocatedEvent(event)) {
@@ -52,10 +44,6 @@ ui::EventResult TrayEventFilter::OnTouchEvent(ui::TouchEvent* event) {
return ui::ER_UNHANDLED;
}
-ui::EventResult TrayEventFilter::OnGestureEvent(ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
bool TrayEventFilter::ProcessLocatedEvent(ui::LocatedEvent* event) {
if (event->target()) {
aura::Window* target = static_cast<aura::Window*>(event->target());
diff --git a/ash/system/tray/tray_event_filter.h b/ash/system/tray/tray_event_filter.h
index 02194b7..dd86f3b 100644
--- a/ash/system/tray/tray_event_filter.h
+++ b/ash/system/tray/tray_event_filter.h
@@ -26,11 +26,8 @@ class TrayEventFilter : public ui::EventHandler {
virtual ~TrayEventFilter();
// Overridden from ui::EventHandler.
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private:
// Returns true if the event is handled.
diff --git a/ash/tooltips/tooltip_controller.cc b/ash/tooltips/tooltip_controller.cc
index aa19e31..c13bcdd 100644
--- a/ash/tooltips/tooltip_controller.cc
+++ b/ash/tooltips/tooltip_controller.cc
@@ -300,10 +300,6 @@ ui::EventResult TooltipController::OnMouseEvent(ui::MouseEvent* event) {
return ui::ER_UNHANDLED;
}
-ui::EventResult TooltipController::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult TooltipController::OnTouchEvent(ui::TouchEvent* event) {
// TODO(varunjain): need to properly implement tooltips for
// touch events.
@@ -316,10 +312,6 @@ ui::EventResult TooltipController::OnTouchEvent(ui::TouchEvent* event) {
return ui::ER_UNHANDLED;
}
-ui::EventResult TooltipController::OnGestureEvent(ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
void TooltipController::OnWindowDestroyed(aura::Window* window) {
if (tooltip_window_ == window) {
tooltip_window_->RemoveObserver(this);
diff --git a/ash/tooltips/tooltip_controller.h b/ash/tooltips/tooltip_controller.h
index dba89d2..67c6f77 100644
--- a/ash/tooltips/tooltip_controller.h
+++ b/ash/tooltips/tooltip_controller.h
@@ -44,9 +44,7 @@ class ASH_EXPORT TooltipController : public aura::client::TooltipClient,
// Overridden from ui::EventHandler.
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// Overridden from aura::WindowObserver.
virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
diff --git a/ash/touch/touch_observer_hud.cc b/ash/touch/touch_observer_hud.cc
index b33d500..22dc029 100644
--- a/ash/touch/touch_observer_hud.cc
+++ b/ash/touch/touch_observer_hud.cc
@@ -182,18 +182,6 @@ void TouchObserverHUD::UpdateTouchPointLabel(int index) {
touch_labels_[index]->SetText(UTF8ToUTF16(string));
}
-ui::EventResult TouchObserverHUD::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult TouchObserverHUD::OnMouseEvent(ui::MouseEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult TouchObserverHUD::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult TouchObserverHUD::OnTouchEvent(ui::TouchEvent* event) {
if (event->touch_id() >= kMaxTouchPoints)
return ui::ER_UNHANDLED;
@@ -213,10 +201,6 @@ ui::EventResult TouchObserverHUD::OnTouchEvent(ui::TouchEvent* event) {
return ui::ER_UNHANDLED;
}
-ui::EventResult TouchObserverHUD::OnGestureEvent(ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
void TouchObserverHUD::OnWidgetClosing(views::Widget* widget) {
DCHECK_EQ(widget, widget_);
widget_ = NULL;
diff --git a/ash/touch/touch_observer_hud.h b/ash/touch/touch_observer_hud.h
index ccfb23d..03c1bac 100644
--- a/ash/touch/touch_observer_hud.h
+++ b/ash/touch/touch_observer_hud.h
@@ -35,11 +35,7 @@ class TouchObserverHUD : public ui::EventHandler,
void UpdateTouchPointLabel(int index);
// Overriden from ui::EventHandler:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// Overridden from views::WidgetObserver:
virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index ff50653..965210d 100644
--- a/ash/wm/app_list_controller.cc
+++ b/ash/wm/app_list_controller.cc
@@ -246,24 +246,12 @@ void AppListController::UpdateBounds() {
////////////////////////////////////////////////////////////////////////////////
// AppListController, aura::EventFilter implementation:
-ui::EventResult AppListController::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult AppListController::OnMouseEvent(ui::MouseEvent* event) {
if (event->type() == ui::ET_MOUSE_PRESSED)
ProcessLocatedEvent(event);
return ui::ER_UNHANDLED;
}
-ui::EventResult AppListController::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult AppListController::OnTouchEvent(ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult AppListController::OnGestureEvent(ui::GestureEvent* event) {
if (event->type() == ui::ET_GESTURE_TAP)
ProcessLocatedEvent(event);
diff --git a/ash/wm/app_list_controller.h b/ash/wm/app_list_controller.h
index 0cb6982..119d136 100644
--- a/ash/wm/app_list_controller.h
+++ b/ash/wm/app_list_controller.h
@@ -76,10 +76,7 @@ class AppListController : public ui::EventHandler,
void UpdateBounds();
// ui::EventHandler overrides:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// aura::FocusChangeObserver overrides:
diff --git a/ash/wm/event_rewriter_event_filter.cc b/ash/wm/event_rewriter_event_filter.cc
index 7031581..fc36c0c 100644
--- a/ash/wm/event_rewriter_event_filter.cc
+++ b/ash/wm/event_rewriter_event_filter.cc
@@ -56,19 +56,5 @@ ui::EventResult EventRewriterEventFilter::OnMouseEvent(ui::MouseEvent* event) {
return ui::ER_UNHANDLED;
}
-ui::EventResult EventRewriterEventFilter::OnScrollEvent(
- ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult EventRewriterEventFilter::OnTouchEvent(ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult EventRewriterEventFilter::OnGestureEvent(
- ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
} // namespace internal
} // namespace ash
diff --git a/ash/wm/event_rewriter_event_filter.h b/ash/wm/event_rewriter_event_filter.h
index 9473e99..f839064 100644
--- a/ash/wm/event_rewriter_event_filter.h
+++ b/ash/wm/event_rewriter_event_filter.h
@@ -29,9 +29,6 @@ class ASH_EXPORT EventRewriterEventFilter : public ui::EventHandler {
// Overridden from ui::EventHandler:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
scoped_ptr<EventRewriterDelegate> delegate_;
diff --git a/ash/wm/overlay_event_filter.cc b/ash/wm/overlay_event_filter.cc
index 3540a0b..a0d02ce 100644
--- a/ash/wm/overlay_event_filter.cc
+++ b/ash/wm/overlay_event_filter.cc
@@ -59,18 +59,6 @@ ui::EventResult OverlayEventFilter::OnMouseEvent(ui::MouseEvent* event) {
return ui::ER_UNHANDLED;
}
-ui::EventResult OverlayEventFilter::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult OverlayEventFilter::OnTouchEvent(ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult OverlayEventFilter::OnGestureEvent(ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
void OverlayEventFilter::OnLoginStateChanged(
user::LoginStatus status) {
Cancel();
diff --git a/ash/wm/overlay_event_filter.h b/ash/wm/overlay_event_filter.h
index 31c7223..1eb18ed 100644
--- a/ash/wm/overlay_event_filter.h
+++ b/ash/wm/overlay_event_filter.h
@@ -53,9 +53,6 @@ class OverlayEventFilter : public ui::EventHandler,
// ui::EventHandler overrides:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// ShellObserver overrides:
virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE;
diff --git a/ash/wm/panel_window_event_filter.cc b/ash/wm/panel_window_event_filter.cc
index 9891c87..52696aa 100644
--- a/ash/wm/panel_window_event_filter.cc
+++ b/ash/wm/panel_window_event_filter.cc
@@ -35,10 +35,6 @@ PanelWindowEventFilter::~PanelWindowEventFilter() {
panel_container_->RemovePreTargetHandler(this);
}
-ui::EventResult PanelWindowEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult PanelWindowEventFilter::OnMouseEvent(ui::MouseEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
switch (event->type()) {
@@ -96,19 +92,6 @@ ui::EventResult PanelWindowEventFilter::OnMouseEvent(ui::MouseEvent* event) {
}
}
-ui::EventResult PanelWindowEventFilter::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult PanelWindowEventFilter::OnTouchEvent(ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult PanelWindowEventFilter::OnGestureEvent(
- ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
void PanelWindowEventFilter::OnWindowDestroying(aura::Window* window) {
CHECK_EQ(panel_container_, window);
delete this;
diff --git a/ash/wm/panel_window_event_filter.h b/ash/wm/panel_window_event_filter.h
index 88ca570..29971ad 100644
--- a/ash/wm/panel_window_event_filter.h
+++ b/ash/wm/panel_window_event_filter.h
@@ -30,11 +30,7 @@ class PanelWindowEventFilter : public ui::EventHandler,
virtual ~PanelWindowEventFilter();
// Overriden from ui::EventHandler:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// Overridden from aura::WindowObserver:
virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index 5915d51..faf784c 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -74,11 +74,7 @@ class ShelfLayoutManager::AutoHideEventFilter : public ui::EventHandler {
bool in_mouse_drag() const { return in_mouse_drag_; }
// Overridden from ui::EventHandler:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private:
ShelfLayoutManager* shelf_;
@@ -98,11 +94,6 @@ ShelfLayoutManager::AutoHideEventFilter::~AutoHideEventFilter() {
Shell::GetInstance()->RemovePreTargetHandler(this);
}
-ui::EventResult ShelfLayoutManager::AutoHideEventFilter::OnKeyEvent(
- ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult ShelfLayoutManager::AutoHideEventFilter::OnMouseEvent(
ui::MouseEvent* event) {
// This also checks IsShelfWindow() to make sure we don't attempt to hide the
@@ -116,21 +107,6 @@ ui::EventResult ShelfLayoutManager::AutoHideEventFilter::OnMouseEvent(
return ui::ER_UNHANDLED;
}
-ui::EventResult ShelfLayoutManager::AutoHideEventFilter::OnScrollEvent(
- ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult ShelfLayoutManager::AutoHideEventFilter::OnTouchEvent(
- ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult ShelfLayoutManager::AutoHideEventFilter::OnGestureEvent(
- ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
// ShelfLayoutManager:UpdateShelfObserver --------------------------------------
// UpdateShelfObserver is used to delay updating the background until the
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc
index a918ee7..5e40f93 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -53,10 +53,6 @@ SystemGestureEventFilter::SystemGestureEventFilter()
SystemGestureEventFilter::~SystemGestureEventFilter() {
}
-ui::EventResult SystemGestureEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult SystemGestureEventFilter::OnMouseEvent(ui::MouseEvent* event) {
#if defined(OS_CHROMEOS)
if (event->type() == ui::ET_MOUSE_PRESSED && event->native_event() &&
@@ -69,11 +65,6 @@ ui::EventResult SystemGestureEventFilter::OnMouseEvent(ui::MouseEvent* event) {
return ui::ER_UNHANDLED;
}
-ui::EventResult SystemGestureEventFilter::OnScrollEvent(
- ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult SystemGestureEventFilter::OnTouchEvent(ui::TouchEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
touch_uma_.RecordTouchEvent(target, *event);
diff --git a/ash/wm/system_gesture_event_filter.h b/ash/wm/system_gesture_event_filter.h
index 23935f7..8d7843f 100644
--- a/ash/wm/system_gesture_event_filter.h
+++ b/ash/wm/system_gesture_event_filter.h
@@ -45,9 +45,7 @@ class SystemGestureEventFilter : public ui::EventHandler,
virtual ~SystemGestureEventFilter();
// Overridden from ui::EventHandler:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
diff --git a/ash/wm/system_modal_container_event_filter.cc b/ash/wm/system_modal_container_event_filter.cc
index 693e696..5103d2d 100644
--- a/ash/wm/system_modal_container_event_filter.cc
+++ b/ash/wm/system_modal_container_event_filter.cc
@@ -33,22 +33,5 @@ ui::EventResult SystemModalContainerEventFilter::OnMouseEvent(
ui::ER_CONSUMED;
}
-ui::EventResult SystemModalContainerEventFilter::OnScrollEvent(
- ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult SystemModalContainerEventFilter::OnTouchEvent(
- ui::TouchEvent* event) {
- // TODO(sadrul): !
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult SystemModalContainerEventFilter::OnGestureEvent(
- ui::GestureEvent* event) {
- // TODO(sad):
- return ui::ER_UNHANDLED;
-}
-
} // namespace internal
} // namespace ash
diff --git a/ash/wm/system_modal_container_event_filter.h b/ash/wm/system_modal_container_event_filter.h
index b4cc2b6..64653ee 100644
--- a/ash/wm/system_modal_container_event_filter.h
+++ b/ash/wm/system_modal_container_event_filter.h
@@ -24,9 +24,6 @@ class ASH_EXPORT SystemModalContainerEventFilter : public ui::EventHandler {
// Overridden from ui::EventHandler:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private:
SystemModalContainerEventFilterDelegate* delegate_;
diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc
index c8d5769..987d4db 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -156,16 +156,6 @@ ui::EventResult ToplevelWindowEventHandler::OnMouseEvent(
return ui::ER_UNHANDLED;
}
-ui::EventResult ToplevelWindowEventHandler::OnScrollEvent(
- ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult ToplevelWindowEventHandler::OnTouchEvent(
- ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult ToplevelWindowEventHandler::OnGestureEvent(
ui::GestureEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
diff --git a/ash/wm/toplevel_window_event_handler.h b/ash/wm/toplevel_window_event_handler.h
index 142eca4..2304e25 100644
--- a/ash/wm/toplevel_window_event_handler.h
+++ b/ash/wm/toplevel_window_event_handler.h
@@ -40,8 +40,6 @@ class ASH_EXPORT ToplevelWindowEventHandler
// Overridden from ui::EventHandler:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// Overridden form aura::client::WindowMoveClient:
diff --git a/ash/wm/window_cycle_controller.cc b/ash/wm/window_cycle_controller.cc
index c5e3641..046f812 100644
--- a/ash/wm/window_cycle_controller.cc
+++ b/ash/wm/window_cycle_controller.cc
@@ -35,10 +35,6 @@ class WindowCycleEventFilter : public ui::EventHandler {
// Overridden from ui::EventHandler:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter);
};
@@ -60,23 +56,6 @@ ui::EventResult WindowCycleEventFilter::OnKeyEvent(ui::KeyEvent* event) {
return ui::ER_UNHANDLED; // Always let the event propagate.
}
-ui::EventResult WindowCycleEventFilter::OnMouseEvent(ui::MouseEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult WindowCycleEventFilter::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult WindowCycleEventFilter::OnTouchEvent(ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult WindowCycleEventFilter::OnGestureEvent(
- ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
// Adds all the children of |window| to |windows|.
void AddAllChildren(aura::Window* window,
WindowCycleList::WindowList* windows) {
diff --git a/ash/wm/window_modality_controller.cc b/ash/wm/window_modality_controller.cc
index d60bf96..1d60aa9 100644
--- a/ash/wm/window_modality_controller.cc
+++ b/ash/wm/window_modality_controller.cc
@@ -86,23 +86,12 @@ ui::EventResult WindowModalityController::OnMouseEvent(ui::MouseEvent* event) {
ui::ER_UNHANDLED;
}
-ui::EventResult WindowModalityController::OnScrollEvent(
- ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult WindowModalityController::OnTouchEvent(ui::TouchEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
return ProcessLocatedEvent(target, event) ? ui::ER_CONSUMED :
ui::ER_UNHANDLED;
}
-ui::EventResult WindowModalityController::OnGestureEvent(
- ui::GestureEvent* event) {
- // TODO: make gestures work with modals.
- return ui::ER_UNHANDLED;
-}
-
void WindowModalityController::OnWindowInitialized(aura::Window* window) {
windows_.push_back(window);
window->AddObserver(this);
diff --git a/ash/wm/window_modality_controller.h b/ash/wm/window_modality_controller.h
index 6f685f6..c58136f8 100644
--- a/ash/wm/window_modality_controller.h
+++ b/ash/wm/window_modality_controller.h
@@ -40,9 +40,7 @@ class WindowModalityController : public ui::EventHandler,
// Overridden from ui::EventHandler:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// Overridden from aura::EnvObserver:
virtual void OnWindowInitialized(aura::Window* window) OVERRIDE;
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index 455bd80..2d2a57a 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -48,10 +48,6 @@ class FrameMaximizeButton::EscapeEventFilter : public ui::EventHandler {
// EventFilter overrides:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private:
FrameMaximizeButton* button_;
@@ -78,26 +74,6 @@ ui::EventResult FrameMaximizeButton::EscapeEventFilter::OnKeyEvent(
return ui::ER_UNHANDLED;
}
-ui::EventResult FrameMaximizeButton::EscapeEventFilter::OnMouseEvent(
- ui::MouseEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult FrameMaximizeButton::EscapeEventFilter::OnScrollEvent(
- ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult FrameMaximizeButton::EscapeEventFilter::OnTouchEvent(
- ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult FrameMaximizeButton::EscapeEventFilter::OnGestureEvent(
- ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
// FrameMaximizeButton ---------------------------------------------------------
FrameMaximizeButton::FrameMaximizeButton(views::ButtonListener* listener,
diff --git a/chrome/browser/ui/views/ash/tab_scrubber.cc b/chrome/browser/ui/views/ash/tab_scrubber.cc
index 5ae8e76..23e26b8 100644
--- a/chrome/browser/ui/views/ash/tab_scrubber.cc
+++ b/chrome/browser/ui/views/ash/tab_scrubber.cc
@@ -36,10 +36,6 @@ TabScrubber::TabScrubber()
TabScrubber::~TabScrubber() {
}
-ui::EventResult TabScrubber::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult TabScrubber::OnMouseEvent(ui::MouseEvent* event) {
Browser* browser = GetActiveBrowser();
@@ -90,18 +86,6 @@ ui::EventResult TabScrubber::OnMouseEvent(ui::MouseEvent* event) {
return ui::ER_CONSUMED;
}
-ui::EventResult TabScrubber::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult TabScrubber::OnTouchEvent(ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult TabScrubber::OnGestureEvent(ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
void TabScrubber::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
diff --git a/chrome/browser/ui/views/ash/tab_scrubber.h b/chrome/browser/ui/views/ash/tab_scrubber.h
index 5f92ac0..a9da901 100644
--- a/chrome/browser/ui/views/ash/tab_scrubber.h
+++ b/chrome/browser/ui/views/ash/tab_scrubber.h
@@ -7,7 +7,6 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "ui/aura/window.h"
#include "ui/base/events/event_handler.h"
class Browser;
@@ -27,11 +26,7 @@ class TabScrubber : public ui::EventHandler,
virtual ~TabScrubber();
// ui::EventHandler overrides:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// content::NotificationObserver overrides:
virtual void Observe(int type,
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index 5797010..cac39fd 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -94,7 +94,6 @@
'ui_controls_x11.cc',
'window.cc',
'window.h',
- 'window_delegate.cc',
'window_delegate.h',
'window_observer.h',
'window_tracker.cc',
diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc
index c97be64..ec35d99 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -649,18 +649,6 @@ class DeletingEventFilter : public ui::EventHandler {
return ui::ER_UNHANDLED;
}
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
bool delete_during_pre_handle_;
DISALLOW_COPY_AND_ASSIGN(DeletingEventFilter);
diff --git a/ui/aura/window_delegate.cc b/ui/aura/window_delegate.cc
deleted file mode 100644
index 3302303..0000000
--- a/ui/aura/window_delegate.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/aura/window_delegate.h"
-
-namespace aura {
-
-ui::EventResult WindowDelegate::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-} // namespace aura
diff --git a/ui/aura/window_delegate.h b/ui/aura/window_delegate.h
index fb98de7..f79b469 100644
--- a/ui/aura/window_delegate.h
+++ b/ui/aura/window_delegate.h
@@ -102,9 +102,6 @@ class AURA_EXPORT WindowDelegate : public ui::EventHandler {
protected:
virtual ~WindowDelegate() {}
-
- // Overridden from ui::EventHandler:
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
};
} // namespace aura
diff --git a/ui/base/events/event_handler.cc b/ui/base/events/event_handler.cc
new file mode 100644
index 0000000..9ae82bf
--- /dev/null
+++ b/ui/base/events/event_handler.cc
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/base/events/event_handler.h"
+
+namespace ui {
+
+EventHandler::EventHandler() {
+}
+
+EventHandler::~EventHandler() {
+}
+
+EventResult EventHandler::OnKeyEvent(KeyEvent* event) {
+ return ui::ER_UNHANDLED;
+}
+
+EventResult EventHandler::OnMouseEvent(MouseEvent* event) {
+ return ui::ER_UNHANDLED;
+}
+
+EventResult EventHandler::OnScrollEvent(ScrollEvent* event) {
+ return ui::ER_UNHANDLED;
+}
+
+EventResult EventHandler::OnTouchEvent(TouchEvent* event) {
+ return ui::ER_UNHANDLED;
+}
+
+EventResult EventHandler::OnGestureEvent(GestureEvent* event) {
+ return ui::ER_UNHANDLED;
+}
+
+} // namespace ui
diff --git a/ui/base/events/event_handler.h b/ui/base/events/event_handler.h
index 84e6b6e..2221add 100644
--- a/ui/base/events/event_handler.h
+++ b/ui/base/events/event_handler.h
@@ -20,21 +20,22 @@ class TouchEvent;
class EventTarget;
-// Dispatches events to appropriate targets.
+// Dispatches events to appropriate targets. The default implementations return
+// ER_UNHANDLED for all events.
class UI_EXPORT EventHandler {
public:
- EventHandler() {}
- virtual ~EventHandler() {}
+ EventHandler();
+ virtual ~EventHandler();
- virtual EventResult OnKeyEvent(KeyEvent* event) = 0;
+ virtual EventResult OnKeyEvent(KeyEvent* event);
- virtual EventResult OnMouseEvent(MouseEvent* event) = 0;
+ virtual EventResult OnMouseEvent(MouseEvent* event);
- virtual EventResult OnScrollEvent(ScrollEvent* event) = 0;
+ virtual EventResult OnScrollEvent(ScrollEvent* event);
- virtual EventResult OnTouchEvent(TouchEvent* event) = 0;
+ virtual EventResult OnTouchEvent(TouchEvent* event);
- virtual EventResult OnGestureEvent(GestureEvent* event) = 0;
+ virtual EventResult OnGestureEvent(GestureEvent* event);
};
typedef std::vector<EventHandler*> EventHandlerList;
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 07d80ac..8dd11c0 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -162,6 +162,7 @@
'base/events/event_constants.h',
'base/events/event_dispatcher.cc',
'base/events/event_dispatcher.h',
+ 'base/events/event_handler.cc',
'base/events/event_handler.h',
'base/events/event_target.cc',
'base/events/event_target.h',
diff --git a/ui/views/corewm/compound_event_filter_unittest.cc b/ui/views/corewm/compound_event_filter_unittest.cc
index 6a0099d..d073200 100644
--- a/ui/views/corewm/compound_event_filter_unittest.cc
+++ b/ui/views/corewm/compound_event_filter_unittest.cc
@@ -64,22 +64,6 @@ class ConsumeGestureEventFilter : public ui::EventHandler {
private:
// Overridden from ui::EventHandler:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
-
virtual ui::EventResult OnGestureEvent(ui::GestureEvent* e) OVERRIDE {
return ui::ER_CONSUMED;
}
diff --git a/ui/views/corewm/input_method_event_filter.cc b/ui/views/corewm/input_method_event_filter.cc
index a6ef49b..350ab4f 100644
--- a/ui/views/corewm/input_method_event_filter.cc
+++ b/ui/views/corewm/input_method_event_filter.cc
@@ -59,22 +59,6 @@ ui::EventResult InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) {
}
}
-ui::EventResult InputMethodEventFilter::OnMouseEvent(ui::MouseEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult InputMethodEventFilter::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult InputMethodEventFilter::OnTouchEvent(ui::TouchEvent* e) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult InputMethodEventFilter::OnGestureEvent(ui::GestureEvent* e) {
- return ui::ER_UNHANDLED;
-}
-
////////////////////////////////////////////////////////////////////////////////
// InputMethodEventFilter, ui::InputMethodDelegate implementation:
diff --git a/ui/views/corewm/input_method_event_filter.h b/ui/views/corewm/input_method_event_filter.h
index efcfbd2..99a42c3 100644
--- a/ui/views/corewm/input_method_event_filter.h
+++ b/ui/views/corewm/input_method_event_filter.h
@@ -39,10 +39,6 @@ class VIEWS_EXPORT InputMethodEventFilter
private:
// Overridden from ui::EventHandler:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// Overridden from ui::internal::InputMethodDelegate.
virtual void DispatchKeyEventPostIME(const base::NativeEvent& event) OVERRIDE;
diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.cc b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
index eb849e1..42269bd 100644
--- a/ui/views/widget/desktop_aura/x11_window_event_filter.cc
+++ b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
@@ -88,10 +88,6 @@ void X11WindowEventFilter::SetUseHostWindowBorders(bool use_os_border) {
sizeof(MotifWmHints)/sizeof(long));
}
-ui::EventResult X11WindowEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
ui::EventResult X11WindowEventFilter::OnMouseEvent(ui::MouseEvent* event) {
if (event->type() != ui::ET_MOUSE_PRESSED)
return ui::ER_UNHANDLED;
@@ -111,18 +107,6 @@ ui::EventResult X11WindowEventFilter::OnMouseEvent(ui::MouseEvent* event) {
ui::ER_CONSUMED : ui::ER_UNHANDLED;
}
-ui::EventResult X11WindowEventFilter::OnScrollEvent(ui::ScrollEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult X11WindowEventFilter::OnTouchEvent(ui::TouchEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
-ui::EventResult X11WindowEventFilter::OnGestureEvent(ui::GestureEvent* event) {
- return ui::ER_UNHANDLED;
-}
-
bool X11WindowEventFilter::DispatchHostWindowDragMovement(
int hittest,
const gfx::Point& screen_location) {
diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.h b/ui/views/widget/desktop_aura/x11_window_event_filter.h
index 97d6be2..5f7bedc 100644
--- a/ui/views/widget/desktop_aura/x11_window_event_filter.h
+++ b/ui/views/widget/desktop_aura/x11_window_event_filter.h
@@ -39,11 +39,7 @@ class VIEWS_EXPORT X11WindowEventFilter : public ui::EventHandler {
void SetUseHostWindowBorders(bool use_os_border);
// Overridden from ui::EventHandler:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private:
// Dispatches a _NET_WM_MOVERESIZE message to the window manager to tell it