diff options
74 files changed, 204 insertions, 255 deletions
diff --git a/ash/accelerators/accelerator_filter.cc b/ash/accelerators/accelerator_filter.cc index 652ed6d..18bf9c2b 100644 --- a/ash/accelerators/accelerator_filter.cc +++ b/ash/accelerators/accelerator_filter.cc @@ -91,7 +91,7 @@ ui::TouchStatus AcceleratorFilter::PreHandleTouchEvent( ui::GestureStatus AcceleratorFilter::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/accelerators/accelerator_filter.h b/ash/accelerators/accelerator_filter.h index 2d2e5f9..48fc300 100644 --- a/ash/accelerators/accelerator_filter.h +++ b/ash/accelerators/accelerator_filter.h @@ -30,7 +30,7 @@ class ASH_EXPORT AcceleratorFilter : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + 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 474119e..d9ec8b5 100644 --- a/ash/display/mouse_cursor_event_filter.cc +++ b/ash/display/mouse_cursor_event_filter.cc @@ -54,7 +54,7 @@ ui::TouchStatus MouseCursorEventFilter::PreHandleTouchEvent( ui::GestureStatus MouseCursorEventFilter::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/display/mouse_cursor_event_filter.h b/ash/display/mouse_cursor_event_filter.h index 34df074..937d73d 100644 --- a/ash/display/mouse_cursor_event_filter.h +++ b/ash/display/mouse_cursor_event_filter.h @@ -30,7 +30,7 @@ class ASH_EXPORT MouseCursorEventFilter : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: DisplayController* display_controller_; diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc index cd99aeb..445468a 100644 --- a/ash/drag_drop/drag_drop_controller.cc +++ b/ash/drag_drop/drag_drop_controller.cc @@ -254,7 +254,7 @@ ui::TouchStatus DragDropController::PreHandleTouchEvent( ui::GestureStatus DragDropController::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/drag_drop/drag_drop_controller.h b/ash/drag_drop/drag_drop_controller.h index e806265..468ba58 100644 --- a/ash/drag_drop/drag_drop_controller.h +++ b/ash/drag_drop/drag_drop_controller.h @@ -68,7 +68,7 @@ class ASH_EXPORT DragDropController ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; // Overridden from aura::WindowObserver. virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; diff --git a/ash/launcher/launcher_tooltip_manager.cc b/ash/launcher/launcher_tooltip_manager.cc index 04f7fbc..31b1704 100644 --- a/ash/launcher/launcher_tooltip_manager.cc +++ b/ash/launcher/launcher_tooltip_manager.cc @@ -339,7 +339,7 @@ ui::TouchStatus LauncherTooltipManager::PreHandleTouchEvent( } ui::GestureStatus LauncherTooltipManager::PreHandleGestureEvent( - aura::Window* target, ui::GestureEventImpl* event) { + aura::Window* target, ui::GestureEvent* event) { if (widget_ && widget_->IsVisible()) { // Because this mouse event may arrive to |view_|, here we just schedule // the closing event rather than directly calling Close(). diff --git a/ash/launcher/launcher_tooltip_manager.h b/ash/launcher/launcher_tooltip_manager.h index ed13731..7443049 100644 --- a/ash/launcher/launcher_tooltip_manager.h +++ b/ash/launcher/launcher_tooltip_manager.h @@ -80,7 +80,7 @@ protected: ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; // ShelfLayoutManager::Observer overrides: virtual void WillDeleteShelf() OVERRIDE; diff --git a/ash/launcher/launcher_tooltip_manager_unittest.cc b/ash/launcher/launcher_tooltip_manager_unittest.cc index 527b4cd..04d28c1 100644 --- a/ash/launcher/launcher_tooltip_manager_unittest.cc +++ b/ash/launcher/launcher_tooltip_manager_unittest.cc @@ -161,7 +161,7 @@ TEST_F(LauncherTooltipManagerTest, ShouldHideForEvents) { EXPECT_TRUE(TooltipIsVisible()); // Should hide for gesture events. - ui::GestureEventImpl gesture_event( + ui::GestureEvent gesture_event( ui::ET_GESTURE_BEGIN, 0, 0, ui::EF_NONE, base::Time(), ui::GestureEventDetails(ui::ET_GESTURE_BEGIN, 0.0f, 0.0f), 0); EXPECT_EQ(ui::GESTURE_STATUS_UNKNOWN, diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc index 4a84ef4..cf028cd 100644 --- a/ash/magnifier/magnification_controller.cc +++ b/ash/magnifier/magnification_controller.cc @@ -107,7 +107,7 @@ class MagnificationControllerImpl : virtual public MagnificationController, ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; aura::RootWindow* root_window_; @@ -454,7 +454,7 @@ ui::TouchStatus MagnificationControllerImpl::PreHandleTouchEvent( ui::GestureStatus MagnificationControllerImpl::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/system/tray/tray_bubble_view.cc b/ash/system/tray/tray_bubble_view.cc index 93b6c7e..88ca056 100644 --- a/ash/system/tray/tray_bubble_view.cc +++ b/ash/system/tray/tray_bubble_view.cc @@ -477,7 +477,7 @@ ui::TouchStatus TrayBubbleView::Host::PreHandleTouchEvent( ui::GestureStatus TrayBubbleView::Host::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/system/tray/tray_bubble_view.h b/ash/system/tray/tray_bubble_view.h index 93489ed..dccf245c 100644 --- a/ash/system/tray/tray_bubble_view.h +++ b/ash/system/tray/tray_bubble_view.h @@ -56,7 +56,7 @@ class TrayBubbleView : public views::BubbleDelegateView { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: void ProcessLocatedEvent(const ui::LocatedEvent& event); diff --git a/ash/tooltips/tooltip_controller.cc b/ash/tooltips/tooltip_controller.cc index 1be88a9..ed2528f 100644 --- a/ash/tooltips/tooltip_controller.cc +++ b/ash/tooltips/tooltip_controller.cc @@ -309,7 +309,7 @@ ui::TouchStatus TooltipController::PreHandleTouchEvent( ui::GestureStatus TooltipController::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/tooltips/tooltip_controller.h b/ash/tooltips/tooltip_controller.h index 0c1190b..a1a110f 100644 --- a/ash/tooltips/tooltip_controller.h +++ b/ash/tooltips/tooltip_controller.h @@ -50,7 +50,7 @@ class ASH_EXPORT TooltipController : public aura::client::TooltipClient, aura::Window* target, ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent(aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + 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 65b75bd..95bcc64 100644 --- a/ash/touch/touch_observer_hud.cc +++ b/ash/touch/touch_observer_hud.cc @@ -215,7 +215,7 @@ ui::TouchStatus TouchObserverHUD::PreHandleTouchEvent( ui::GestureStatus TouchObserverHUD::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/touch/touch_observer_hud.h b/ash/touch/touch_observer_hud.h index c3d56fe..48991ce 100644 --- a/ash/touch/touch_observer_hud.h +++ b/ash/touch/touch_observer_hud.h @@ -44,7 +44,7 @@ class TouchObserverHUD : public aura::EventFilter, ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; // Overridden from views::WidgetObserver: virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; diff --git a/ash/touch/touch_uma.cc b/ash/touch/touch_uma.cc index ca2a826..a43af46 100644 --- a/ash/touch/touch_uma.cc +++ b/ash/touch/touch_uma.cc @@ -89,7 +89,7 @@ DEFINE_OWNED_WINDOW_PROPERTY_KEY(WindowTouchDetails, NULL); GestureActionType FindGestureActionType(aura::Window* window, - const ui::GestureEventImpl& event) { + const ui::GestureEvent& event) { if (!window || window->GetRootWindow() == window) { if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) return GESTURE_BEZEL_SCROLL; @@ -166,8 +166,8 @@ UMAEventType UMAEventTypeFromEvent(const ui::Event& event) { case ui::ET_GESTURE_SCROLL_END: return UMA_ET_GESTURE_SCROLL_END; case ui::ET_GESTURE_SCROLL_UPDATE: { - const ui::GestureEventImpl& gesture = - static_cast<const ui::GestureEventImpl&>(event); + const ui::GestureEvent& gesture = + static_cast<const ui::GestureEvent&>(event); if (gesture.details().touch_points() >= 4) return UMA_ET_GESTURE_SCROLL_UPDATE_4P; else if (gesture.details().touch_points() == 3) @@ -193,8 +193,8 @@ UMAEventType UMAEventTypeFromEvent(const ui::Event& event) { case ui::ET_GESTURE_PINCH_END: return UMA_ET_GESTURE_PINCH_END; case ui::ET_GESTURE_PINCH_UPDATE: { - const ui::GestureEventImpl& gesture = - static_cast<const ui::GestureEventImpl&>(event); + const ui::GestureEvent& gesture = + static_cast<const ui::GestureEvent&>(event); if (gesture.details().touch_points() >= 4) return UMA_ET_GESTURE_PINCH_UPDATE_4P; else if (gesture.details().touch_points() == 3) @@ -204,8 +204,8 @@ UMAEventType UMAEventTypeFromEvent(const ui::Event& event) { case ui::ET_GESTURE_LONG_PRESS: return UMA_ET_GESTURE_LONG_PRESS; case ui::ET_GESTURE_MULTIFINGER_SWIPE: { - const ui::GestureEventImpl& gesture = - static_cast<const ui::GestureEventImpl&>(event); + const ui::GestureEvent& gesture = + static_cast<const ui::GestureEvent&>(event); if (gesture.details().touch_points() >= 4) return UMA_ET_GESTURE_MULTIFINGER_SWIPE_4P; else if (gesture.details().touch_points() == 3) @@ -235,7 +235,7 @@ TouchUMA::~TouchUMA() { } void TouchUMA::RecordGestureEvent(aura::Window* target, - const ui::GestureEventImpl& event) { + const ui::GestureEvent& event) { UMA_HISTOGRAM_ENUMERATION("Ash.GestureCreated", UMAEventTypeFromEvent(event), UMA_ET_COUNT); diff --git a/ash/touch/touch_uma.h b/ash/touch/touch_uma.h index 457fdd1..94e1164 100644 --- a/ash/touch/touch_uma.h +++ b/ash/touch/touch_uma.h @@ -27,7 +27,7 @@ class TouchUMA { ~TouchUMA(); void RecordGestureEvent(aura::Window* target, - const ui::GestureEventImpl& event); + const ui::GestureEvent& event); void RecordTouchEvent(aura::Window* target, const ui::TouchEvent& event); diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc index 4a15e92..6d90148 100644 --- a/ash/wm/app_list_controller.cc +++ b/ash/wm/app_list_controller.cc @@ -253,7 +253,7 @@ ui::TouchStatus AppListController::PreHandleTouchEvent( ui::GestureStatus AppListController::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { if (event->type() == ui::ET_GESTURE_TAP) ProcessLocatedEvent(target, *event); return ui::GESTURE_STATUS_UNKNOWN; diff --git a/ash/wm/app_list_controller.h b/ash/wm/app_list_controller.h index 6e67b0b..f15cd604 100644 --- a/ash/wm/app_list_controller.h +++ b/ash/wm/app_list_controller.h @@ -83,7 +83,7 @@ class AppListController : public aura::EventFilter, ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; // aura::FocusChangeObserver overrides: virtual void OnWindowFocused(aura::Window* window) OVERRIDE; diff --git a/ash/wm/event_rewriter_event_filter.cc b/ash/wm/event_rewriter_event_filter.cc index 83a9aef..3337334 100644 --- a/ash/wm/event_rewriter_event_filter.cc +++ b/ash/wm/event_rewriter_event_filter.cc @@ -64,7 +64,7 @@ ui::TouchStatus EventRewriterEventFilter::PreHandleTouchEvent( } ui::GestureStatus EventRewriterEventFilter::PreHandleGestureEvent( - aura::Window* target, ui::GestureEventImpl* event) { + aura::Window* target, ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; // Not handled. } diff --git a/ash/wm/event_rewriter_event_filter.h b/ash/wm/event_rewriter_event_filter.h index 5a633a5..1252827 100644 --- a/ash/wm/event_rewriter_event_filter.h +++ b/ash/wm/event_rewriter_event_filter.h @@ -36,7 +36,7 @@ class ASH_EXPORT EventRewriterEventFilter : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + 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 a3b2395..719145b 100644 --- a/ash/wm/overlay_event_filter.cc +++ b/ash/wm/overlay_event_filter.cc @@ -64,7 +64,7 @@ ui::TouchStatus OverlayEventFilter::PreHandleTouchEvent( } ui::GestureStatus OverlayEventFilter::PreHandleGestureEvent( - aura::Window* target, ui::GestureEventImpl* event) { + aura::Window* target, ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; // Not handled. } diff --git a/ash/wm/overlay_event_filter.h b/ash/wm/overlay_event_filter.h index 49d0250..4ce8442 100644 --- a/ash/wm/overlay_event_filter.h +++ b/ash/wm/overlay_event_filter.h @@ -57,7 +57,7 @@ class OverlayEventFilter : public aura::EventFilter, virtual ui::TouchStatus PreHandleTouchEvent( aura::Window* target, ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( - aura::Window* target, ui::GestureEventImpl* event) OVERRIDE; + aura::Window* target, 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 bab183f..e6cd109 100644 --- a/ash/wm/panel_window_event_filter.cc +++ b/ash/wm/panel_window_event_filter.cc @@ -102,7 +102,7 @@ ui::TouchStatus PanelWindowEventFilter::PreHandleTouchEvent( } ui::GestureStatus PanelWindowEventFilter::PreHandleGestureEvent( - aura::Window* target, ui::GestureEventImpl* event) { + aura::Window* target, ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/wm/panel_window_event_filter.h b/ash/wm/panel_window_event_filter.h index db2fb12..c3773c5 100644 --- a/ash/wm/panel_window_event_filter.h +++ b/ash/wm/panel_window_event_filter.h @@ -37,7 +37,7 @@ class PanelWindowEventFilter : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: enum DragState { diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc index a2b847e..a621c4a 100644 --- a/ash/wm/shelf_layout_manager.cc +++ b/ash/wm/shelf_layout_manager.cc @@ -67,7 +67,7 @@ class ShelfLayoutManager::AutoHideEventFilter : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: ShelfLayoutManager* shelf_; @@ -116,7 +116,7 @@ ui::TouchStatus ShelfLayoutManager::AutoHideEventFilter::PreHandleTouchEvent( ui::GestureStatus ShelfLayoutManager::AutoHideEventFilter::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; // Not handled. } diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc index e909acb..3d79937 100644 --- a/ash/wm/system_gesture_event_filter.cc +++ b/ash/wm/system_gesture_event_filter.cc @@ -374,7 +374,7 @@ class SystemPinchHandler { ~SystemPinchHandler() { } - SystemGestureStatus ProcessGestureEvent(const ui::GestureEventImpl& event) { + SystemGestureStatus ProcessGestureEvent(const ui::GestureEvent& event) { // The target has changed, somehow. Let's bale. if (!widget_ || !widget_->widget_delegate()->CanResize()) return SYSTEM_GESTURE_END; @@ -551,7 +551,7 @@ ui::TouchStatus SystemGestureEventFilter::PreHandleTouchEvent( } ui::GestureStatus SystemGestureEventFilter::PreHandleGestureEvent( - aura::Window* target, ui::GestureEventImpl* event) { + aura::Window* target, ui::GestureEvent* event) { touch_uma_.RecordGestureEvent(target, *event); long_press_affordance_->ProcessEvent(target, event); if (!target || target == target->GetRootWindow()) { @@ -677,7 +677,7 @@ void SystemGestureEventFilter::ClearGestureHandlerForWindow( bool SystemGestureEventFilter::HandleDeviceControl( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { gfx::Rect screen = gfx::Screen::GetDisplayNearestWindow(target).bounds(); double percent = 100.0 * (event->y() - screen.y()) / screen.height(); if (percent > 100.0) @@ -704,7 +704,7 @@ bool SystemGestureEventFilter::HandleDeviceControl( } bool SystemGestureEventFilter::HandleLauncherControl( - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { if (start_location_ == BEZEL_START_BOTTOM && event->details().scroll_y() < 0) { ash::AcceleratorController* accelerator = @@ -717,7 +717,7 @@ bool SystemGestureEventFilter::HandleLauncherControl( } bool SystemGestureEventFilter::HandleApplicationControl( - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { ash::AcceleratorController* accelerator = ash::Shell::GetInstance()->accelerator_controller(); if (start_location_ == BEZEL_START_LEFT && event->details().scroll_x() > 0) diff --git a/ash/wm/system_gesture_event_filter.h b/ash/wm/system_gesture_event_filter.h index 9585481..a035070 100644 --- a/ash/wm/system_gesture_event_filter.h +++ b/ash/wm/system_gesture_event_filter.h @@ -101,7 +101,7 @@ class SystemGestureEventFilter : public aura::EventFilter, ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; // Overridden from aura::WindowObserver. virtual void OnWindowVisibilityChanged(aura::Window* window, @@ -116,15 +116,15 @@ class SystemGestureEventFilter : public aura::EventFilter, // Handle events meant for volume / brightness. Returns true when no further // events from this gesture should be sent. - bool HandleDeviceControl(aura::Window* target, ui::GestureEventImpl* event); + bool HandleDeviceControl(aura::Window* target, ui::GestureEvent* event); // Handle events meant for showing the launcher. Returns true when no further // events from this gesture should be sent. - bool HandleLauncherControl(ui::GestureEventImpl* event); + bool HandleLauncherControl(ui::GestureEvent* event); // Handle events meant to switch through applications. Returns true when no // further events from this gesture should be sent. - bool HandleApplicationControl(ui::GestureEventImpl* event); + bool HandleApplicationControl(ui::GestureEvent* event); typedef std::map<aura::Window*, SystemPinchHandler*> WindowPinchHandlerMap; // Created on demand when a system-level pinch gesture is initiated. Destroyed diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc index 638f2d9..bd98858 100644 --- a/ash/wm/system_gesture_event_filter_unittest.cc +++ b/ash/wm/system_gesture_event_filter_unittest.cc @@ -138,13 +138,13 @@ class SystemGestureEventFilterTest : public AshTestBase { DISALLOW_COPY_AND_ASSIGN(SystemGestureEventFilterTest); }; -ui::GestureEventImpl* CreateGesture(ui::EventType type, +ui::GestureEvent* CreateGesture(ui::EventType type, int x, int y, float delta_x, float delta_y, int touch_id) { - return new ui::GestureEventImpl(type, x, y, 0, base::Time::Now(), + return new ui::GestureEvent(type, x, y, 0, base::Time::Now(), ui::GestureEventDetails(type, delta_x, delta_y), 1 << touch_id); } @@ -162,7 +162,7 @@ TEST_F(SystemGestureEventFilterTest, TapOutsideRootWindow) { base::Time::NowFromSystemTime() - base::Time()); root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); - ui::GestureEventImpl* event = CreateGesture( + ui::GestureEvent* event = CreateGesture( ui::ET_GESTURE_TAP, 0, 0, 0, 0, kTouchId); bool consumed = root_window->DispatchGestureEvent(event); @@ -173,7 +173,7 @@ TEST_F(SystemGestureEventFilterTest, TapOutsideRootWindow) { Shell::GetInstance()->RemoveEnvEventFilter( shell_test.system_gesture_event_filter()); - ui::GestureEventImpl* event2 = CreateGesture( + ui::GestureEvent* event2 = CreateGesture( ui::ET_GESTURE_TAP, 0, 0, 0, 0, kTouchId); consumed = root_window->DispatchGestureEvent(event2); @@ -220,7 +220,7 @@ TEST_F(SystemGestureEventFilterTest, DeviceControl) { base::Time::NowFromSystemTime() - base::Time()); root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); - ui::GestureEventImpl* event1 = CreateGesture( + ui::GestureEvent* event1 = CreateGesture( ui::ET_GESTURE_SCROLL_BEGIN, xpos, ypos, 0, 0, kTouchId); bool consumed = root_window->DispatchGestureEvent(event1); @@ -229,7 +229,7 @@ TEST_F(SystemGestureEventFilterTest, DeviceControl) { EXPECT_EQ(0, delegate->handle_percent_count()); // No move at the beginning will produce no events. - ui::GestureEventImpl* event2 = CreateGesture( + ui::GestureEvent* event2 = CreateGesture( ui::ET_GESTURE_SCROLL_UPDATE, xpos, ypos, 0, 0, kTouchId); consumed = root_window->DispatchGestureEvent(event2); @@ -238,7 +238,7 @@ TEST_F(SystemGestureEventFilterTest, DeviceControl) { EXPECT_EQ(0, delegate->handle_percent_count()); // A move to a new Y location will produce an event. - ui::GestureEventImpl* event3 = CreateGesture( + ui::GestureEvent* event3 = CreateGesture( ui::ET_GESTURE_SCROLL_UPDATE, xpos, ypos + ypos_half, 0, ypos_half, kTouchId); consumed = root_window->DispatchGestureEvent(event3); @@ -248,7 +248,7 @@ TEST_F(SystemGestureEventFilterTest, DeviceControl) { EXPECT_EQ(50.0, delegate->handle_percent()); // A move to an illegal Y location will produce legal results. - ui::GestureEventImpl* event4 = CreateGesture( + ui::GestureEvent* event4 = CreateGesture( ui::ET_GESTURE_SCROLL_UPDATE, xpos, ypos - 100, 0, -ypos_half - 100, kTouchId); consumed = root_window->DispatchGestureEvent(event4); @@ -257,7 +257,7 @@ TEST_F(SystemGestureEventFilterTest, DeviceControl) { EXPECT_EQ(2, delegate->handle_percent_count()); EXPECT_EQ(100.0, delegate->handle_percent()); - ui::GestureEventImpl* event5 = CreateGesture( + ui::GestureEvent* event5 = CreateGesture( ui::ET_GESTURE_SCROLL_UPDATE, xpos, ypos + 2 * screen.height(), 0, 2 * screen.height() + 100, kTouchId); consumed = root_window->DispatchGestureEvent(event5); @@ -267,7 +267,7 @@ TEST_F(SystemGestureEventFilterTest, DeviceControl) { EXPECT_EQ(0.0, delegate->handle_percent()); // Finishing the gesture should not change anything. - ui::GestureEventImpl* event7 = CreateGesture( + ui::GestureEvent* event7 = CreateGesture( ui::ET_GESTURE_SCROLL_END, xpos, ypos + ypos_half, 0, 0, kTouchId); consumed = root_window->DispatchGestureEvent(event7); @@ -276,7 +276,7 @@ TEST_F(SystemGestureEventFilterTest, DeviceControl) { EXPECT_EQ(3, delegate->handle_percent_count()); // Another event after this one should get ignored. - ui::GestureEventImpl* event8 = CreateGesture( + ui::GestureEvent* event8 = CreateGesture( ui::ET_GESTURE_SCROLL_UPDATE, xpos, ypos_half, 0, 0, kTouchId); consumed = root_window->DispatchGestureEvent(event8); @@ -336,7 +336,7 @@ TEST_F(SystemGestureEventFilterTest, ApplicationControl) { base::Time::NowFromSystemTime() - base::Time()); root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); - ui::GestureEventImpl* event1 = CreateGesture( + ui::GestureEvent* event1 = CreateGesture( ui::ET_GESTURE_SCROLL_BEGIN, xpos, ypos, 0, 0, kTouchId); bool consumed = root_window->DispatchGestureEvent(event1); @@ -345,7 +345,7 @@ TEST_F(SystemGestureEventFilterTest, ApplicationControl) { EXPECT_EQ(ash::wm::GetActiveWindow(), active_window); // No move at the beginning will produce no events. - ui::GestureEventImpl* event2 = CreateGesture( + ui::GestureEvent* event2 = CreateGesture( ui::ET_GESTURE_SCROLL_UPDATE, xpos, ypos, 0, 0, kTouchId); consumed = root_window->DispatchGestureEvent(event2); @@ -354,7 +354,7 @@ TEST_F(SystemGestureEventFilterTest, ApplicationControl) { EXPECT_EQ(ash::wm::GetActiveWindow(), active_window); // A move further to the outside will not trigger an action. - ui::GestureEventImpl* event3 = CreateGesture( + ui::GestureEvent* event3 = CreateGesture( ui::ET_GESTURE_SCROLL_UPDATE, xpos - delta_x, ypos, -delta_x, 0, kTouchId); consumed = root_window->DispatchGestureEvent(event3); @@ -363,7 +363,7 @@ TEST_F(SystemGestureEventFilterTest, ApplicationControl) { EXPECT_EQ(ash::wm::GetActiveWindow(), active_window); // A move to the proper side will trigger an action. - ui::GestureEventImpl* event4 = CreateGesture( + ui::GestureEvent* event4 = CreateGesture( ui::ET_GESTURE_SCROLL_UPDATE, xpos + delta_x, ypos, 2 * delta_x, 0, kTouchId); consumed = root_window->DispatchGestureEvent(event4); @@ -373,7 +373,7 @@ TEST_F(SystemGestureEventFilterTest, ApplicationControl) { active_window = ash::wm::GetActiveWindow(); // A second move to the proper side will not trigger an action. - ui::GestureEventImpl* event5 = CreateGesture( + ui::GestureEvent* event5 = CreateGesture( ui::ET_GESTURE_SCROLL_UPDATE, xpos + 2 * delta_x, ypos, delta_x, 0, kTouchId); consumed = root_window->DispatchGestureEvent(event5); diff --git a/ash/wm/system_modal_container_event_filter.cc b/ash/wm/system_modal_container_event_filter.cc index eb835b7..33c3571 100644 --- a/ash/wm/system_modal_container_event_filter.cc +++ b/ash/wm/system_modal_container_event_filter.cc @@ -39,7 +39,7 @@ ui::TouchStatus SystemModalContainerEventFilter::PreHandleTouchEvent( ui::GestureStatus SystemModalContainerEventFilter::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { // TODO(sad): return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/wm/system_modal_container_event_filter.h b/ash/wm/system_modal_container_event_filter.h index cded403..23916fb 100644 --- a/ash/wm/system_modal_container_event_filter.h +++ b/ash/wm/system_modal_container_event_filter.h @@ -30,7 +30,7 @@ class ASH_EXPORT SystemModalContainerEventFilter : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: SystemModalContainerEventFilterDelegate* delegate_; diff --git a/ash/wm/toplevel_window_event_filter.cc b/ash/wm/toplevel_window_event_filter.cc index 3a6abd7..a8bc6dc 100644 --- a/ash/wm/toplevel_window_event_filter.cc +++ b/ash/wm/toplevel_window_event_filter.cc @@ -126,7 +126,7 @@ ui::TouchStatus ToplevelWindowEventFilter::PreHandleTouchEvent( ui::GestureStatus ToplevelWindowEventFilter::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { switch (event->type()) { case ui::ET_GESTURE_SCROLL_BEGIN: { int component = diff --git a/ash/wm/toplevel_window_event_filter.h b/ash/wm/toplevel_window_event_filter.h index fc4fa578..cae3bab 100644 --- a/ash/wm/toplevel_window_event_filter.h +++ b/ash/wm/toplevel_window_event_filter.h @@ -51,7 +51,7 @@ class ASH_EXPORT ToplevelWindowEventFilter : ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; // Overridden form aura::client::WindowMoveClient: virtual void RunMoveLoop(aura::Window* source) OVERRIDE; diff --git a/ash/wm/user_activity_detector.cc b/ash/wm/user_activity_detector.cc index c2c5d1a..ad4dcf5 100644 --- a/ash/wm/user_activity_detector.cc +++ b/ash/wm/user_activity_detector.cc @@ -58,7 +58,7 @@ ui::TouchStatus UserActivityDetector::PreHandleTouchEvent( ui::GestureStatus UserActivityDetector::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { if (!GetRootWindowController(target->GetRootWindow())) return ui::GESTURE_STATUS_CONSUMED; MaybeNotify(); diff --git a/ash/wm/user_activity_detector.h b/ash/wm/user_activity_detector.h index 51f1d11..384a11d 100644 --- a/ash/wm/user_activity_detector.h +++ b/ash/wm/user_activity_detector.h @@ -43,7 +43,7 @@ class ASH_EXPORT UserActivityDetector : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: // Notifies observers if enough time has passed since the last notification. diff --git a/ash/wm/user_activity_detector_unittest.cc b/ash/wm/user_activity_detector_unittest.cc index cdf94f1..1465fef 100644 --- a/ash/wm/user_activity_detector_unittest.cc +++ b/ash/wm/user_activity_detector_unittest.cc @@ -104,7 +104,7 @@ TEST_F(UserActivityDetectorTest, Basic) { observer_->reset_stats(); AdvanceTime(advance_delta); - ui::GestureEventImpl gesture_event( + ui::GestureEvent gesture_event( ui::ET_GESTURE_TAP, 0, 0, ui::EF_NONE, base::Time(), ui::GestureEventDetails(ui::ET_GESTURE_TAP, 0, 0), 0U); EXPECT_FALSE(detector_->PreHandleGestureEvent(window.get(), &gesture_event)); diff --git a/ash/wm/window_cycle_controller.cc b/ash/wm/window_cycle_controller.cc index 31fea4e..3223018 100644 --- a/ash/wm/window_cycle_controller.cc +++ b/ash/wm/window_cycle_controller.cc @@ -42,7 +42,7 @@ class WindowCycleEventFilter : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter); }; @@ -80,7 +80,7 @@ ui::TouchStatus WindowCycleEventFilter::PreHandleTouchEvent( ui::GestureStatus WindowCycleEventFilter::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; // Not handled. } diff --git a/ash/wm/window_modality_controller.cc b/ash/wm/window_modality_controller.cc index 1c72edf..6532565 100644 --- a/ash/wm/window_modality_controller.cc +++ b/ash/wm/window_modality_controller.cc @@ -93,7 +93,7 @@ ui::TouchStatus WindowModalityController::PreHandleTouchEvent( ui::GestureStatus WindowModalityController::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { // TODO: make gestures work with modals. return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ash/wm/window_modality_controller.h b/ash/wm/window_modality_controller.h index 05ac6bb..6dc0242 100644 --- a/ash/wm/window_modality_controller.h +++ b/ash/wm/window_modality_controller.h @@ -47,7 +47,7 @@ class WindowModalityController : public aura::EventFilter, ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + 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 33cdbf1..360c77e 100644 --- a/ash/wm/workspace/frame_maximize_button.cc +++ b/ash/wm/workspace/frame_maximize_button.cc @@ -52,7 +52,7 @@ class FrameMaximizeButton::EscapeEventFilter : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: FrameMaximizeButton* button_; @@ -94,7 +94,7 @@ ui::TouchStatus FrameMaximizeButton::EscapeEventFilter::PreHandleTouchEvent( ui::GestureStatus FrameMaximizeButton::EscapeEventFilter::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index b02fdad..37bb8ef 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -1294,7 +1294,7 @@ ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent( } ui::GestureStatus RenderWidgetHostViewAura::OnGestureEvent( - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnGestureEvent"); // Pinch gestures are currently disabled by default. See crbug.com/128477. if ((event->type() == ui::ET_GESTURE_PINCH_BEGIN || @@ -1405,7 +1405,7 @@ bool RenderWidgetHostViewAura::ShouldActivate(const ui::Event* event) { if (event->type() == ui::ET_MOUSE_PRESSED) { activate = true; } else if (event->type() == ui::ET_GESTURE_BEGIN) { - activate = static_cast<const ui::GestureEventImpl*>(event)-> + activate = static_cast<const ui::GestureEvent*>(event)-> details().touch_points() == 1; } } diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index 4913a89..63f86d94 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h @@ -168,7 +168,7 @@ class RenderWidgetHostViewAura virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE; virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus OnGestureEvent( - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; virtual bool CanFocus() OVERRIDE; virtual void OnCaptureLost() OVERRIDE; virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc index 237a320..ea249f2 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.cc +++ b/content/browser/renderer_host/render_widget_host_view_win.cc @@ -270,25 +270,25 @@ bool DecodeScrollGesture(const GESTUREINFO& gi, WebKit::WebMouseWheelEvent MakeFakeScrollWheelEvent(HWND hwnd, POINT start, POINT delta) { - WebKit::WebMouseWheelEvent result; - result.type = WebInputEvent::MouseWheel; - result.timeStampSeconds = ::GetMessageTime() / 1000.0; - result.button = WebMouseEvent::ButtonNone; - result.globalX = start.x; - result.globalY = start.y; - // Map to window coordinates. - POINT client_point = { result.globalX, result.globalY }; - MapWindowPoints(0, hwnd, &client_point, 1); - result.x = client_point.x; - result.y = client_point.y; - result.windowX = result.x; - result.windowY = result.y; - // Note that we support diagonal scrolling. - result.deltaX = static_cast<float>(delta.x); - result.wheelTicksX = WHEEL_DELTA; - result.deltaY = static_cast<float>(delta.y); - result.wheelTicksY = WHEEL_DELTA; - return result; + WebKit::WebMouseWheelEvent result; + result.type = WebInputEvent::MouseWheel; + result.timeStampSeconds = ::GetMessageTime() / 1000.0; + result.button = WebMouseEvent::ButtonNone; + result.globalX = start.x; + result.globalY = start.y; + // Map to window coordinates. + POINT client_point = { result.globalX, result.globalY }; + MapWindowPoints(0, hwnd, &client_point, 1); + result.x = client_point.x; + result.y = client_point.y; + result.windowX = result.x; + result.windowY = result.y; + // Note that we support diagonal scrolling. + result.deltaX = static_cast<float>(delta.x); + result.wheelTicksX = WHEEL_DELTA; + result.deltaY = static_cast<float>(delta.y); + result.wheelTicksY = WHEEL_DELTA; + return result; } static const int kTouchMask = 0x7; @@ -301,25 +301,6 @@ inline void SetTouchType(TOUCHINPUT* point, int type) { point->dwFlags = (point->dwFlags & kTouchMask) | type; } -template <class IINTERFACE, class PAYLOAD> -class WrappedObject : public IINTERFACE { - public: - WrappedObject() { - } - const PAYLOAD& data() const { - return data_; - } - PAYLOAD& data() { - return data_; - } - - private: - PAYLOAD data_; - - typedef WrappedObject<IINTERFACE,PAYLOAD> Type; - DISALLOW_COPY_AND_ASSIGN(Type); -}; - ui::EventType ConvertToUIEvent(WebKit::WebTouchPoint::State t) { switch (t) { case WebKit::WebTouchPoint::StatePressed: @@ -391,68 +372,57 @@ WebKit::WebInputEvent::Type ConvertToWebInputEvent(ui::EventType t) { } } -class LocalGestureEvent : - public WrappedObject<ui::GestureEvent, WebKit::WebGestureEvent> { +class LocalGestureEvent : public ui::GestureEvent { public: - LocalGestureEvent( - HWND hwnd, - const ui::GestureEventDetails& details, - const gfx::Point& location, - int flags, - base::Time time, - unsigned int touch_id_bitfield) - : touch_ids_bitfield_(touch_id_bitfield), - type_(details.type()) { - // location is given in window coordinates, based on the parent window. - // Map to the appropriate window's coordinates. For a root window the - // coordinates won't change, because the parent shares our rect. - POINT client_point = { location.x(), location.y()}; - MapWindowPoints(::GetParent(hwnd), hwnd, &client_point, 1); - POINT screen_point = { location.x(), location.y()}; - MapWindowPoints(hwnd, HWND_DESKTOP, &screen_point, 1); - data().x = client_point.x; - data().y = client_point.y; - data().globalX = screen_point.x; - data().globalY = screen_point.y; - data().type = ConvertToWebInputEvent(type_); - data().boundingBox = details.bounding_box(); + LocalGestureEvent(HWND hwnd, + const ui::GestureEventDetails& details, + const gfx::Point& location, + int flags, + base::Time time, + unsigned int touch_id_bitfield) + : ui::GestureEvent(details.type(), location.x(), location.y(), flags, + time, details, touch_id_bitfield), + client_point_(location.ToPOINT()), + screen_point_(location.ToPOINT()) { + MapWindowPoints(::GetParent(hwnd), hwnd, &client_point_, 1); + MapWindowPoints(hwnd, HWND_DESKTOP, &screen_point_, 1); + } + + virtual ~LocalGestureEvent() {} + + WebKit::WebGestureEvent ToWebGestureEvent() { + WebKit::WebGestureEvent gesture_event; + gesture_event.type = ConvertToWebInputEvent(type()); + gesture_event.x = client_point_.x; + gesture_event.y = client_point_.y; + gesture_event.globalX = screen_point_.x; + gesture_event.globalY = screen_point_.y; + gesture_event.boundingBox = details().bounding_box(); // Copy any event-type specific data. - switch (type_) { + switch (type()) { case ui::ET_GESTURE_TAP: - data().deltaX = details.tap_count(); + gesture_event.deltaX = details().tap_count(); break; case ui::ET_GESTURE_SCROLL_UPDATE: - data().deltaX = details.scroll_x(); - data().deltaY = details.scroll_y(); + gesture_event.deltaX = details().scroll_x(); + gesture_event.deltaY = details().scroll_y(); break; case ui::ET_GESTURE_PINCH_UPDATE: - data().deltaX = details.scale(); + gesture_event.deltaX = details().scale(); break; case ui::ET_SCROLL_FLING_START: - data().deltaX = details.velocity_x(); - data().deltaY = details.velocity_y(); + gesture_event.deltaX = details().velocity_x(); + gesture_event.deltaY = details().velocity_y(); default: break; } - } - - virtual int GetLowestTouchId() const OVERRIDE { - return LowestBit(touch_ids_bitfield_); - } - - ui::EventType type() { - return type_; + return gesture_event; } private: - // The set of indices of ones in the binary representation of - // |touch_ids_bitfield_| is the set of touch_ids associate with this gesture. - // This value is stored as a bitfield because the number of touch ids varies, - // but we currently don't need more than 32 touches at a time. - const unsigned int touch_ids_bitfield_; - - ui::EventType type_; + POINT client_point_; + POINT screen_point_; DISALLOW_COPY_AND_ASSIGN(LocalGestureEvent); }; @@ -2828,10 +2798,10 @@ bool RenderWidgetHostViewWin::ForwardGestureEventToRenderer( return false; LocalGestureEvent* local = static_cast<LocalGestureEvent*>(gesture); - if (local->data().type == WebKit::WebGestureEvent::Undefined) + WebKit::WebGestureEvent gesture_event = local->ToWebGestureEvent(); + if (gesture_event.type == WebKit::WebGestureEvent::Undefined) return false; - const WebKit::WebGestureEvent& generatedEvent = local->data(); - render_widget_host_->ForwardGestureEvent(generatedEvent); + render_widget_host_->ForwardGestureEvent(gesture_event); return true; } diff --git a/content/browser/renderer_host/web_input_event_aura.cc b/content/browser/renderer_host/web_input_event_aura.cc index 3395c47..89bd014 100644 --- a/content/browser/renderer_host/web_input_event_aura.cc +++ b/content/browser/renderer_host/web_input_event_aura.cc @@ -29,7 +29,7 @@ WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( ui::KeyEvent* event); WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( - ui::GestureEventImpl* event); + ui::GestureEvent* event); WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( ui::ScrollEvent* event); WebKit::WebTouchPoint* UpdateWebTouchEventFromAuraEvent( @@ -139,7 +139,7 @@ WebKit::WebKeyboardEvent MakeWebKeyboardEvent(ui::KeyEvent* event) { #endif } -WebKit::WebGestureEvent MakeWebGestureEvent(ui::GestureEventImpl* event) { +WebKit::WebGestureEvent MakeWebGestureEvent(ui::GestureEvent* event) { WebKit::WebGestureEvent gesture_event; #if defined(OS_WIN) gesture_event = MakeWebGestureEventFromNativeEvent(event->native_event()); diff --git a/content/browser/renderer_host/web_input_event_aura.h b/content/browser/renderer_host/web_input_event_aura.h index 231a580..82119a9 100644 --- a/content/browser/renderer_host/web_input_event_aura.h +++ b/content/browser/renderer_host/web_input_event_aura.h @@ -9,7 +9,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" namespace ui { -class GestureEventImpl; +class GestureEvent; class KeyEvent; class MouseEvent; class ScrollEvent; @@ -27,7 +27,7 @@ CONTENT_EXPORT WebKit::WebMouseWheelEvent MakeWebMouseWheelEvent( CONTENT_EXPORT WebKit::WebKeyboardEvent MakeWebKeyboardEvent( ui::KeyEvent* event); CONTENT_EXPORT WebKit::WebGestureEvent MakeWebGestureEvent( - ui::GestureEventImpl* event); + ui::GestureEvent* event); CONTENT_EXPORT WebKit::WebGestureEvent MakeWebGestureEvent( ui::ScrollEvent* event); CONTENT_EXPORT WebKit::WebGestureEvent MakeWebGestureEventFlingCancel(); diff --git a/content/browser/renderer_host/web_input_event_aurax11.cc b/content/browser/renderer_host/web_input_event_aurax11.cc index 934df1d..c6b1ead 100644 --- a/content/browser/renderer_host/web_input_event_aurax11.cc +++ b/content/browser/renderer_host/web_input_event_aurax11.cc @@ -358,7 +358,7 @@ WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( } WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { WebKit::WebGestureEvent gesture_event; switch (event->type()) { diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index 6b382ec..ac67fdf 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -537,7 +537,7 @@ ui::TouchStatus WebContentsViewAura::OnTouchEvent(ui::TouchEvent* event) { } ui::GestureStatus WebContentsViewAura::OnGestureEvent( - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h index a2377c1..1a2ad60 100644 --- a/content/browser/web_contents/web_contents_view_aura.h +++ b/content/browser/web_contents/web_contents_view_aura.h @@ -103,7 +103,7 @@ class CONTENT_EXPORT WebContentsViewAura virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE; virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus OnGestureEvent( - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; virtual bool CanFocus() OVERRIDE; virtual void OnCaptureLost() OVERRIDE; virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc index 48b50d2..0571759 100644 --- a/ui/aura/demo/demo_main.cc +++ b/ui/aura/demo/demo_main.cc @@ -63,7 +63,7 @@ class DemoWindowDelegate : public aura::WindowDelegate { return ui::TOUCH_STATUS_END; } virtual ui::GestureStatus OnGestureEvent( - ui::GestureEventImpl* event) OVERRIDE { + ui::GestureEvent* event) OVERRIDE { return ui::GESTURE_STATUS_UNKNOWN; } virtual bool CanFocus() OVERRIDE { return true; } diff --git a/ui/aura/event_filter.h b/ui/aura/event_filter.h index a4e6ecd..0ea8627 100644 --- a/ui/aura/event_filter.h +++ b/ui/aura/event_filter.h @@ -10,7 +10,7 @@ #include "ui/base/events.h" namespace ui { -class GestureEventImpl; +class GestureEvent; class KeyEvent; class MouseEvent; class TouchEvent; @@ -59,7 +59,7 @@ class AURA_EXPORT EventFilter { // consumed. virtual ui::GestureStatus PreHandleGestureEvent( Window* target, - ui::GestureEventImpl* event) = 0; + ui::GestureEvent* event) = 0; }; } // namespace aura diff --git a/ui/aura/event_filter_unittest.cc b/ui/aura/event_filter_unittest.cc index 6bf4703..ea1c052 100644 --- a/ui/aura/event_filter_unittest.cc +++ b/ui/aura/event_filter_unittest.cc @@ -58,7 +58,7 @@ class TestEventFilterWindowDelegate : public TestWindowDelegate { return ui::TOUCH_STATUS_UNKNOWN; } virtual ui::GestureStatus OnGestureEvent( - ui::GestureEventImpl* event) OVERRIDE { + ui::GestureEvent* event) OVERRIDE { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ui/aura/gestures/gesture_recognizer_unittest.cc b/ui/aura/gestures/gesture_recognizer_unittest.cc index e3403e0..4328cf6 100644 --- a/ui/aura/gestures/gesture_recognizer_unittest.cc +++ b/ui/aura/gestures/gesture_recognizer_unittest.cc @@ -115,7 +115,7 @@ class GestureEventConsumeDelegate : public TestWindowDelegate { int tap_count() const { return tap_count_; } virtual ui::GestureStatus OnGestureEvent( - ui::GestureEventImpl* gesture) OVERRIDE { + ui::GestureEvent* gesture) OVERRIDE { bounding_box_ = gesture->details().bounding_box(); switch (gesture->type()) { case ui::ET_GESTURE_TAP: diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc index d800b6c..dc25b54 100644 --- a/ui/aura/root_window.cc +++ b/ui/aura/root_window.cc @@ -272,7 +272,7 @@ void RootWindow::ScheduleFullDraw() { compositor_->ScheduleFullDraw(); } -bool RootWindow::DispatchGestureEvent(ui::GestureEventImpl* event) { +bool RootWindow::DispatchGestureEvent(ui::GestureEvent* event) { DispatchHeldMouseMove(); Window* target = client::GetCaptureWindow(this); @@ -284,7 +284,7 @@ bool RootWindow::DispatchGestureEvent(ui::GestureEventImpl* event) { } if (target) { - ui::GestureEventImpl translated_event( + ui::GestureEvent translated_event( *event, static_cast<Window*>(this), target); ui::GestureStatus status = ProcessGestureEvent(target, &translated_event); return status != ui::GESTURE_STATUS_UNKNOWN; @@ -659,7 +659,7 @@ ui::TouchStatus RootWindow::ProcessTouchEvent(Window* target, } ui::GestureStatus RootWindow::ProcessGestureEvent(Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { if (!target->IsVisible()) return ui::GESTURE_STATUS_UNKNOWN; @@ -688,8 +688,8 @@ bool RootWindow::ProcessGestures(ui::GestureRecognizer::Gestures* gestures) { return false; bool handled = false; for (unsigned int i = 0; i < gestures->size(); i++) { - ui::GestureEventImpl* gesture = - static_cast<ui::GestureEventImpl*>(gestures->get().at(i)); + ui::GestureEvent* gesture = + static_cast<ui::GestureEvent*>(gestures->get().at(i)); if (DispatchGestureEvent(gesture) != ui::GESTURE_STATUS_UNKNOWN) handled = true; } @@ -755,7 +755,7 @@ void RootWindow::OnWindowAddedToRootWindow(Window* attached) { } bool RootWindow::DispatchLongPressGestureEvent(ui::GestureEvent* event) { - return DispatchGestureEvent(static_cast<ui::GestureEventImpl*>(event)); + return DispatchGestureEvent(static_cast<ui::GestureEvent*>(event)); } bool RootWindow::DispatchCancelTouchEvent(ui::TouchEvent* event) { @@ -768,7 +768,7 @@ ui::GestureEvent* RootWindow::CreateGestureEvent( int flags, base::Time time, unsigned int touch_id_bitfield) { - return new ui::GestureEventImpl(details.type(), location.x(), location.y(), + return new ui::GestureEvent(details.type(), location.x(), location.y(), flags, time, details, touch_id_bitfield); } diff --git a/ui/aura/root_window.h b/ui/aura/root_window.h index c44c879..5bb3054 100644 --- a/ui/aura/root_window.h +++ b/ui/aura/root_window.h @@ -31,7 +31,7 @@ class Size; } namespace ui { -class GestureEventImpl; +class GestureEvent; class GestureRecognizer; class KeyEvent; class LayerAnimationSequence; @@ -145,7 +145,7 @@ class AURA_EXPORT RootWindow : public ui::CompositorDelegate, // Handles a gesture event. Returns true if handled. Unlike the other // event-dispatching function (e.g. for touch/mouse/keyboard events), gesture // events are dispatched from GestureRecognizer instead of RootWindowHost. - bool DispatchGestureEvent(ui::GestureEventImpl* event); + bool DispatchGestureEvent(ui::GestureEvent* event); // Invoked when |window| is being destroyed. void OnWindowDestroying(Window* window); @@ -273,7 +273,7 @@ class AURA_EXPORT RootWindow : public ui::CompositorDelegate, bool ProcessKeyEvent(Window* target, ui::KeyEvent* event); ui::TouchStatus ProcessTouchEvent(Window* target, ui::TouchEvent* event); ui::GestureStatus ProcessGestureEvent(Window* target, - ui::GestureEventImpl* event); + ui::GestureEvent* event); bool ProcessGestures(ui::GestureRecognizer::Gestures* gestures); // Called when a Window is attached or detached from the RootWindow. diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc index c236ea4..48b3743 100644 --- a/ui/aura/root_window_unittest.cc +++ b/ui/aura/root_window_unittest.cc @@ -95,7 +95,7 @@ class EventCountFilter : public EventFilter { return ui::TOUCH_STATUS_UNKNOWN; } virtual ui::GestureStatus PreHandleGestureEvent( - Window* target, ui::GestureEventImpl* event) OVERRIDE { + Window* target, ui::GestureEvent* event) OVERRIDE { return ui::GESTURE_STATUS_UNKNOWN; } @@ -374,7 +374,7 @@ class EventFilterRecorder : public EventFilter { } virtual ui::GestureStatus PreHandleGestureEvent( Window* target, - ui::GestureEventImpl* event) OVERRIDE { + ui::GestureEvent* event) OVERRIDE { events_.push_back(event->type()); return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ui/aura/shared/compound_event_filter.cc b/ui/aura/shared/compound_event_filter.cc index 08cdb51..c87195e 100644 --- a/ui/aura/shared/compound_event_filter.cc +++ b/ui/aura/shared/compound_event_filter.cc @@ -135,7 +135,7 @@ ui::TouchStatus CompoundEventFilter::PreHandleTouchEvent( ui::GestureStatus CompoundEventFilter::PreHandleGestureEvent( Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { ui::GestureStatus status = ui::GESTURE_STATUS_UNKNOWN; if (filters_.might_have_observers()) { ObserverListBase<EventFilter>::Iterator it(filters_); diff --git a/ui/aura/shared/compound_event_filter.h b/ui/aura/shared/compound_event_filter.h index def8007..6707e29 100644 --- a/ui/aura/shared/compound_event_filter.h +++ b/ui/aura/shared/compound_event_filter.h @@ -11,7 +11,7 @@ #include "ui/aura/event_filter.h" namespace ui { -class GestureEventImpl; +class GestureEvent; class KeyEvent; class LocatedEvent; class MouseEvent; @@ -59,7 +59,7 @@ class AURA_EXPORT CompoundEventFilter : public EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: // Updates the cursor if the target provides a custom one, and provides diff --git a/ui/aura/shared/input_method_event_filter.cc b/ui/aura/shared/input_method_event_filter.cc index eab751c..8b1dedc 100644 --- a/ui/aura/shared/input_method_event_filter.cc +++ b/ui/aura/shared/input_method_event_filter.cc @@ -69,7 +69,7 @@ ui::TouchStatus InputMethodEventFilter::PreHandleTouchEvent( ui::GestureStatus InputMethodEventFilter::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ui/aura/shared/input_method_event_filter.h b/ui/aura/shared/input_method_event_filter.h index cbf870e..95d847e 100644 --- a/ui/aura/shared/input_method_event_filter.h +++ b/ui/aura/shared/input_method_event_filter.h @@ -42,7 +42,7 @@ class AURA_EXPORT InputMethodEventFilter ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; // Overridden from ui::internal::InputMethodDelegate. virtual void DispatchKeyEventPostIME(const base::NativeEvent& event) OVERRIDE; diff --git a/ui/aura/test/test_event_filter.cc b/ui/aura/test/test_event_filter.cc index 00d3e9b..b445f94 100644 --- a/ui/aura/test/test_event_filter.cc +++ b/ui/aura/test/test_event_filter.cc @@ -46,7 +46,7 @@ ui::TouchStatus TestEventFilter::PreHandleTouchEvent( ui::GestureStatus TestEventFilter::PreHandleGestureEvent( Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { // TODO(sad): return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ui/aura/test/test_event_filter.h b/ui/aura/test/test_event_filter.h index a941d31..4b4a439 100644 --- a/ui/aura/test/test_event_filter.h +++ b/ui/aura/test/test_event_filter.h @@ -47,7 +47,7 @@ class TestEventFilter : public EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: int key_event_count_; diff --git a/ui/aura/test/test_window_delegate.cc b/ui/aura/test/test_window_delegate.cc index b350edf..807daea 100644 --- a/ui/aura/test/test_window_delegate.cc +++ b/ui/aura/test/test_window_delegate.cc @@ -65,7 +65,7 @@ ui::TouchStatus TestWindowDelegate::OnTouchEvent(ui::TouchEvent* event) { } ui::GestureStatus TestWindowDelegate::OnGestureEvent( - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ui/aura/test/test_window_delegate.h b/ui/aura/test/test_window_delegate.h index 38fd7cd..e17311c 100644 --- a/ui/aura/test/test_window_delegate.h +++ b/ui/aura/test/test_window_delegate.h @@ -40,7 +40,7 @@ class TestWindowDelegate : public WindowDelegate { virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE; virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus OnGestureEvent( - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; virtual bool CanFocus() OVERRIDE; virtual void OnCaptureLost() OVERRIDE; virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; diff --git a/ui/aura/window_delegate.h b/ui/aura/window_delegate.h index 062b886..a4324e2 100644 --- a/ui/aura/window_delegate.h +++ b/ui/aura/window_delegate.h @@ -18,7 +18,7 @@ class Size; } namespace ui { -class GestureEventImpl; +class GestureEvent; class KeyEvent; class MouseEvent; class TouchEvent; @@ -60,7 +60,7 @@ class AURA_EXPORT WindowDelegate { virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) = 0; - virtual ui::GestureStatus OnGestureEvent(ui::GestureEventImpl* event) = 0; + virtual ui::GestureStatus OnGestureEvent(ui::GestureEvent* event) = 0; // Returns true of the window can be focused. virtual bool CanFocus() = 0; diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc index afed3cd..668abad 100644 --- a/ui/aura/window_unittest.cc +++ b/ui/aura/window_unittest.cc @@ -175,7 +175,7 @@ class CaptureWindowDelegateImpl : public TestWindowDelegate { return ui::TOUCH_STATUS_UNKNOWN; } virtual ui::GestureStatus OnGestureEvent( - ui::GestureEventImpl* event) OVERRIDE { + ui::GestureEvent* event) OVERRIDE { gesture_event_count_++; return ui::GESTURE_STATUS_UNKNOWN; } @@ -218,7 +218,7 @@ class GestureTrackPositionDelegate : public TestWindowDelegate { GestureTrackPositionDelegate() {} virtual ui::GestureStatus OnGestureEvent( - ui::GestureEventImpl* event) OVERRIDE { + ui::GestureEvent* event) OVERRIDE { position_ = event->location(); return ui::GESTURE_STATUS_CONSUMED; } diff --git a/ui/base/event.cc b/ui/base/event.cc index 8a57e70..2839236 100644 --- a/ui/base/event.cc +++ b/ui/base/event.cc @@ -373,23 +373,23 @@ ScrollEvent::ScrollEvent(const base::NativeEvent& native_event) } } -GestureEventImpl::GestureEventImpl(EventType type, - int x, - int y, - int flags, - base::Time time_stamp, - const GestureEventDetails& details, - unsigned int touch_ids_bitfield) +GestureEvent::GestureEvent(EventType type, + int x, + int y, + int flags, + base::Time time_stamp, + const GestureEventDetails& details, + unsigned int touch_ids_bitfield) : LocatedEvent(type, gfx::Point(x, y), gfx::Point(x, y), flags), details_(details), touch_ids_bitfield_(touch_ids_bitfield) { set_time_stamp(base::TimeDelta::FromSeconds(time_stamp.ToDoubleT())); } -GestureEventImpl::~GestureEventImpl() { +GestureEvent::~GestureEvent() { } -int GestureEventImpl::GetLowestTouchId() const { +int GestureEvent::GetLowestTouchId() const { if (touch_ids_bitfield_ == 0) return -1; int i = -1; diff --git a/ui/base/event.h b/ui/base/event.h index 7e1b089..c2e4d75 100644 --- a/ui/base/event.h +++ b/ui/base/event.h @@ -210,9 +210,9 @@ class UI_EXPORT TouchEvent : public LocatedEvent { } TouchEvent(EventType type, - const gfx::Point& root_location, - int touch_id, - base::TimeDelta time_stamp); + const gfx::Point& root_location, + int touch_id, + base::TimeDelta time_stamp); virtual ~TouchEvent(); @@ -372,36 +372,33 @@ class UI_EXPORT ScrollEvent : public MouseEvent { DISALLOW_COPY_AND_ASSIGN(ScrollEvent); }; -// TODO(beng): rename to GestureEvent after conversion is complete. -class UI_EXPORT GestureEventImpl : public LocatedEvent, - public GestureEvent { +class UI_EXPORT GestureEvent : public LocatedEvent { public: - GestureEventImpl(EventType type, - int x, - int y, - int flags, - base::Time time_stamp, - const GestureEventDetails& details, - unsigned int touch_ids_bitfield); - - // Create a new GestureEventImpl which is identical to the provided model. + GestureEvent(EventType type, + int x, + int y, + int flags, + base::Time time_stamp, + const GestureEventDetails& details, + unsigned int touch_ids_bitfield); + + // Create a new GestureEvent which is identical to the provided model. // If source / target windows are provided, the model location will be // converted from |source| coordinate system to |target| coordinate system. template <typename T> - GestureEventImpl(const GestureEventImpl& model, T* source, T* target) + GestureEvent(const GestureEvent& model, T* source, T* target) : LocatedEvent(model, source, target), details_(model.details_), touch_ids_bitfield_(model.touch_ids_bitfield_) { } - virtual ~GestureEventImpl(); + virtual ~GestureEvent(); const GestureEventDetails& details() const { return details_; } // Returns the lowest touch-id of any of the touches which make up this - // gesture. - // If there are no touches associated with this gesture, returns -1. - virtual int GetLowestTouchId() const OVERRIDE; + // gesture. If there are no touches associated with this gesture, returns -1. + int GetLowestTouchId() const; private: GestureEventDetails details_; @@ -412,7 +409,7 @@ class UI_EXPORT GestureEventImpl : public LocatedEvent, // but we currently don't need more than 32 touches at a time. const unsigned int touch_ids_bitfield_; - DISALLOW_COPY_AND_ASSIGN(GestureEventImpl); + DISALLOW_COPY_AND_ASSIGN(GestureEvent); }; } // namespace ui diff --git a/ui/base/gestures/gesture_types.h b/ui/base/gestures/gesture_types.h index 48dae70..caab892 100644 --- a/ui/base/gestures/gesture_types.h +++ b/ui/base/gestures/gesture_types.h @@ -12,6 +12,7 @@ namespace ui { +class GestureEvent; class TouchEvent; struct UI_EXPORT GestureEventDetails { @@ -115,25 +116,6 @@ struct UI_EXPORT GestureEventDetails { gfx::Rect bounding_box_; }; -// An abstract type to represent gesture-events. -class UI_EXPORT GestureEvent { - public: - virtual ~GestureEvent() {} - - // A gesture event can have multiple touches. This function should return the - // lowest ID of the touches in this gesture. - virtual int GetLowestTouchId() const = 0; - - // A helper function used in several (all) derived classes. - // Returns lowest set bit, or -1 if no bits are set. - static int LowestBit(unsigned int bitfield) { - int i = -1; - // Find the index of the least significant 1 bit - while (bitfield && (!((1 << ++i) & bitfield))); - return i; - } -}; - // An abstract type for consumers of gesture-events created by the // gesture-recognizer. class UI_EXPORT GestureConsumer { diff --git a/ui/views/events/event_aura.cc b/ui/views/events/event_aura.cc index 41253a0..f2dd81d 100644 --- a/ui/views/events/event_aura.cc +++ b/ui/views/events/event_aura.cc @@ -53,7 +53,7 @@ ScrollEvent::ScrollEvent(const NativeEvent& native_event) GestureEvent::GestureEvent(const NativeEvent& event) : LocatedEvent(event), - details_(static_cast<ui::GestureEventImpl*>(event)->details()) { + details_(static_cast<ui::GestureEvent*>(event)->details()) { } } // namespace views diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc index 8b5551f..9620da2 100644 --- a/ui/views/widget/native_widget_aura.cc +++ b/ui/views/widget/native_widget_aura.cc @@ -817,7 +817,7 @@ ui::TouchStatus NativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) { } ui::GestureStatus NativeWidgetAura::OnGestureEvent( - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { DCHECK(window_->IsVisible()); GestureEvent gesture_event(event); return delegate_->OnGestureEvent(gesture_event); diff --git a/ui/views/widget/native_widget_aura.h b/ui/views/widget/native_widget_aura.h index 6a3ad2ee..129334a 100644 --- a/ui/views/widget/native_widget_aura.h +++ b/ui/views/widget/native_widget_aura.h @@ -141,7 +141,7 @@ class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE; virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus OnGestureEvent( - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; virtual bool CanFocus() OVERRIDE; virtual void OnCaptureLost() OVERRIDE; virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; diff --git a/ui/views/widget/x11_window_event_filter.cc b/ui/views/widget/x11_window_event_filter.cc index 72eaeca..472383c 100644 --- a/ui/views/widget/x11_window_event_filter.cc +++ b/ui/views/widget/x11_window_event_filter.cc @@ -137,7 +137,7 @@ ui::TouchStatus X11WindowEventFilter::PreHandleTouchEvent( ui::GestureStatus X11WindowEventFilter::PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) { + ui::GestureEvent* event) { return ui::GESTURE_STATUS_UNKNOWN; } diff --git a/ui/views/widget/x11_window_event_filter.h b/ui/views/widget/x11_window_event_filter.h index 1ef27f3..d7dfbe3 100644 --- a/ui/views/widget/x11_window_event_filter.h +++ b/ui/views/widget/x11_window_event_filter.h @@ -46,7 +46,7 @@ class VIEWS_EXPORT X11WindowEventFilter : public aura::EventFilter { ui::TouchEvent* event) OVERRIDE; virtual ui::GestureStatus PreHandleGestureEvent( aura::Window* target, - ui::GestureEventImpl* event) OVERRIDE; + ui::GestureEvent* event) OVERRIDE; private: // Dispatches a _NET_WM_MOVERESIZE message to the window manager to tell it |