diff options
Diffstat (limited to 'ash')
33 files changed, 98 insertions, 103 deletions
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc index 28a7a0c..ea324e9 100644 --- a/ash/desktop_background/desktop_background_view.cc +++ b/ash/desktop_background/desktop_background_view.cc @@ -126,7 +126,7 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) { } } -bool DesktopBackgroundView::OnMousePressed(const views::MouseEvent& event) { +bool DesktopBackgroundView::OnMousePressed(const ui::MouseEvent& event) { return true; } diff --git a/ash/desktop_background/desktop_background_view.h b/ash/desktop_background/desktop_background_view.h index 75df941..3793496 100644 --- a/ash/desktop_background/desktop_background_view.h +++ b/ash/desktop_background/desktop_background_view.h @@ -23,7 +23,7 @@ class DesktopBackgroundView : public views::WidgetDelegateView, private: // Overridden from views::View: virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; // Overridden from views::ContextMenuController: virtual void ShowContextMenuForView(views::View* source, diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc index e1f4ebd..4d9f8ab 100644 --- a/ash/drag_drop/drag_drop_controller_unittest.cc +++ b/ash/drag_drop/drag_drop_controller_unittest.cc @@ -67,7 +67,7 @@ class DragTestView : public views::View { data->SetString(UTF8ToUTF16("I am being dragged")); } - bool OnMousePressed(const views::MouseEvent& event) OVERRIDE { + bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { return true; } diff --git a/ash/launcher/app_list_button.cc b/ash/launcher/app_list_button.cc index 484373f..14e80e5 100644 --- a/ash/launcher/app_list_button.cc +++ b/ash/launcher/app_list_button.cc @@ -33,13 +33,13 @@ AppListButton::AppListButton(views::ButtonListener* listener, AppListButton::~AppListButton() { } -bool AppListButton::OnMousePressed(const views::MouseEvent& event) { +bool AppListButton::OnMousePressed(const ui::MouseEvent& event) { ImageButton::OnMousePressed(event); host_->PointerPressedOnButton(this, LauncherButtonHost::MOUSE, event); return true; } -void AppListButton::OnMouseReleased(const views::MouseEvent& event) { +void AppListButton::OnMouseReleased(const ui::MouseEvent& event) { ImageButton::OnMouseReleased(event); host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, false); } @@ -49,23 +49,23 @@ void AppListButton::OnMouseCaptureLost() { ImageButton::OnMouseCaptureLost(); } -bool AppListButton::OnMouseDragged(const views::MouseEvent& event) { +bool AppListButton::OnMouseDragged(const ui::MouseEvent& event) { ImageButton::OnMouseDragged(event); host_->PointerDraggedOnButton(this, LauncherButtonHost::MOUSE, event); return true; } -void AppListButton::OnMouseMoved(const views::MouseEvent& event) { +void AppListButton::OnMouseMoved(const ui::MouseEvent& event) { ImageButton::OnMouseMoved(event); host_->MouseMovedOverButton(this); } -void AppListButton::OnMouseEntered(const views::MouseEvent& event) { +void AppListButton::OnMouseEntered(const ui::MouseEvent& event) { ImageButton::OnMouseEntered(event); host_->MouseEnteredButton(this); } -void AppListButton::OnMouseExited(const views::MouseEvent& event) { +void AppListButton::OnMouseExited(const ui::MouseEvent& event) { ImageButton::OnMouseExited(event); host_->MouseExitedButton(this); } diff --git a/ash/launcher/app_list_button.h b/ash/launcher/app_list_button.h index f08f74b..ee18557 100644 --- a/ash/launcher/app_list_button.h +++ b/ash/launcher/app_list_button.h @@ -21,13 +21,13 @@ class AppListButton : public views::ImageButton { protected: // View overrides: - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; virtual void OnMouseCaptureLost() OVERRIDE; - virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; private: diff --git a/ash/launcher/launcher_button.cc b/ash/launcher/launcher_button.cc index 24b5adf..6bbb9a1 100644 --- a/ash/launcher/launcher_button.cc +++ b/ash/launcher/launcher_button.cc @@ -325,13 +325,13 @@ gfx::Rect LauncherButton::GetIconBounds() const { return icon_view_->bounds(); } -bool LauncherButton::OnMousePressed(const views::MouseEvent& event) { +bool LauncherButton::OnMousePressed(const ui::MouseEvent& event) { CustomButton::OnMousePressed(event); host_->PointerPressedOnButton(this, LauncherButtonHost::MOUSE, event); return true; } -void LauncherButton::OnMouseReleased(const views::MouseEvent& event) { +void LauncherButton::OnMouseReleased(const ui::MouseEvent& event) { CustomButton::OnMouseReleased(event); host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, false); } @@ -342,24 +342,24 @@ void LauncherButton::OnMouseCaptureLost() { CustomButton::OnMouseCaptureLost(); } -bool LauncherButton::OnMouseDragged(const views::MouseEvent& event) { +bool LauncherButton::OnMouseDragged(const ui::MouseEvent& event) { CustomButton::OnMouseDragged(event); host_->PointerDraggedOnButton(this, LauncherButtonHost::MOUSE, event); return true; } -void LauncherButton::OnMouseMoved(const views::MouseEvent& event) { +void LauncherButton::OnMouseMoved(const ui::MouseEvent& event) { CustomButton::OnMouseMoved(event); host_->MouseMovedOverButton(this); } -void LauncherButton::OnMouseEntered(const views::MouseEvent& event) { +void LauncherButton::OnMouseEntered(const ui::MouseEvent& event) { AddState(STATE_HOVERED); CustomButton::OnMouseEntered(event); host_->MouseEnteredButton(this); } -void LauncherButton::OnMouseExited(const views::MouseEvent& event) { +void LauncherButton::OnMouseExited(const ui::MouseEvent& event) { ClearState(STATE_HOVERED); CustomButton::OnMouseExited(event); host_->MouseExitedButton(this); diff --git a/ash/launcher/launcher_button.h b/ash/launcher/launcher_button.h index 73edb2f2..a48c2be 100644 --- a/ash/launcher/launcher_button.h +++ b/ash/launcher/launcher_button.h @@ -82,13 +82,13 @@ class LauncherButton : public views::CustomButton { }; // View overrides: - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; virtual void OnMouseCaptureLost() OVERRIDE; - virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; virtual ui::GestureStatus OnGestureEvent(const views::GestureEvent& event) OVERRIDE; virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; diff --git a/ash/launcher/launcher_view_unittest.cc b/ash/launcher/launcher_view_unittest.cc index 8e48067..d2585bd 100644 --- a/ash/launcher/launcher_view_unittest.cc +++ b/ash/launcher/launcher_view_unittest.cc @@ -271,16 +271,14 @@ class LauncherViewTest : public AshTestBase { ui::MouseEvent click_event(ui::ET_MOUSE_PRESSED, button->bounds().origin(), button->bounds().origin(), 0); - views::MouseEvent views_click_event(&click_event); - button_host->PointerPressedOnButton(button, pointer, views_click_event); + button_host->PointerPressedOnButton(button, pointer, click_event); // Drag. views::View* destination = test_api_->GetButton(destination_index); ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, destination->bounds().origin(), destination->bounds().origin(), 0); - views::MouseEvent views_drag_event(&drag_event); - button_host->PointerDraggedOnButton(button, pointer, views_drag_event); + button_host->PointerDraggedOnButton(button, pointer, drag_event); return button; } diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc index c8be3bb..f712111 100644 --- a/ash/shell/window_type_launcher.cc +++ b/ash/shell/window_type_launcher.cc @@ -265,7 +265,7 @@ void WindowTypeLauncher::OnPaint(gfx::Canvas* canvas) { canvas->FillRect(GetLocalBounds(), SK_ColorWHITE); } -bool WindowTypeLauncher::OnMousePressed(const views::MouseEvent& event) { +bool WindowTypeLauncher::OnMousePressed(const ui::MouseEvent& event) { // Overridden so we get OnMouseReleased and can show the context menu. return true; } diff --git a/ash/shell/window_type_launcher.h b/ash/shell/window_type_launcher.h index a6db81f..82d6f5c 100644 --- a/ash/shell/window_type_launcher.h +++ b/ash/shell/window_type_launcher.h @@ -43,7 +43,7 @@ class WindowTypeLauncher : public views::WidgetDelegateView, // Overridden from views::View: virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; // Overridden from views::WidgetDelegate: virtual views::View* GetContentsView() OVERRIDE; diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc index 29a0492..51b2135 100644 --- a/ash/system/date/date_view.cc +++ b/ash/system/date/date_view.cc @@ -142,7 +142,7 @@ bool DateView::PerformAction(const ui::Event& event) { return true; } -void DateView::OnMouseEntered(const views::MouseEvent& event) { +void DateView::OnMouseEntered(const ui::MouseEvent& event) { if (!actionable_) return; date_label_->SetEnabledColor(kHeaderTextColorHover); @@ -150,7 +150,7 @@ void DateView::OnMouseEntered(const views::MouseEvent& event) { SchedulePaint(); } -void DateView::OnMouseExited(const views::MouseEvent& event) { +void DateView::OnMouseExited(const ui::MouseEvent& event) { if (!actionable_) return; date_label_->SetEnabledColor(kHeaderTextColorNormal); @@ -198,7 +198,7 @@ bool TimeView::PerformAction(const ui::Event& event) { return false; } -bool TimeView::OnMousePressed(const views::MouseEvent& event) { +bool TimeView::OnMousePressed(const ui::MouseEvent& event) { // Let the event fall through. return false; } diff --git a/ash/system/date/date_view.h b/ash/system/date/date_view.h index bb38641..5f88dbc 100644 --- a/ash/system/date/date_view.h +++ b/ash/system/date/date_view.h @@ -67,8 +67,8 @@ class DateView : public BaseDateTimeView { virtual bool PerformAction(const ui::Event& event) OVERRIDE; // Overridden from views::View. - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; views::Label* date_label_; views::Label* day_of_week_label_; @@ -104,7 +104,7 @@ class TimeView : public BaseDateTimeView { virtual bool PerformAction(const ui::Event& event) OVERRIDE; // Overridden from views::View. - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; void SetBorder(TrayDate::ClockLayout clock_layout); void SetupLabels(); diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc index 17b6c47..9aff175 100644 --- a/ash/system/tray/system_tray.cc +++ b/ash/system/tray/system_tray.cc @@ -477,12 +477,12 @@ bool SystemTray::PerformAction(const ui::Event& event) { return true; } -void SystemTray::OnMouseEntered(const views::MouseEvent& event) { +void SystemTray::OnMouseEntered(const ui::MouseEvent& event) { TrayBackgroundView::OnMouseEntered(event); should_show_launcher_ = true; } -void SystemTray::OnMouseExited(const views::MouseEvent& event) { +void SystemTray::OnMouseExited(const ui::MouseEvent& event) { TrayBackgroundView::OnMouseExited(event); // When the popup closes we'll update |should_show_launcher_|. if (!bubble_.get()) diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h index d27bbc5..1050b92 100644 --- a/ash/system/tray/system_tray.h +++ b/ash/system/tray/system_tray.h @@ -198,8 +198,8 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView { virtual bool PerformAction(const ui::Event& event) OVERRIDE; // Overridden from views::View. - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc index 49fe1d5..cac7ebe 100644 --- a/ash/system/tray/system_tray_bubble.cc +++ b/ash/system/tray/system_tray_bubble.cc @@ -123,12 +123,12 @@ class TrayPopupItemContainer : public views::View { PreferredSizeChanged(); } - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE { + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE { hover_ = true; SchedulePaint(); } - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE { + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE { hover_ = false; SchedulePaint(); } diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc index 9617a5a..0a2a196 100644 --- a/ash/system/tray/tray_background_view.cc +++ b/ash/system/tray/tray_background_view.cc @@ -146,12 +146,12 @@ TrayBackgroundView::TrayBackgroundView( TrayBackgroundView::~TrayBackgroundView() { } -void TrayBackgroundView::OnMouseEntered(const views::MouseEvent& event) { +void TrayBackgroundView::OnMouseEntered(const ui::MouseEvent& event) { hover_background_animator_.SetPaintsBackground(true, internal::BackgroundAnimator::CHANGE_ANIMATE); } -void TrayBackgroundView::OnMouseExited(const views::MouseEvent& event) { +void TrayBackgroundView::OnMouseExited(const ui::MouseEvent& event) { hover_background_animator_.SetPaintsBackground(false, internal::BackgroundAnimator::CHANGE_ANIMATE); } diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h index 15f20a9..b4c5425 100644 --- a/ash/system/tray/tray_background_view.h +++ b/ash/system/tray/tray_background_view.h @@ -59,8 +59,8 @@ class ASH_EXPORT TrayBackgroundView : public internal::ActionableView, virtual ~TrayBackgroundView(); // Overridden from views::View. - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE; // Overridden from internal::ActionableView. diff --git a/ash/system/tray/tray_bubble_view.cc b/ash/system/tray/tray_bubble_view.cc index 88ca056..4551e9d 100644 --- a/ash/system/tray/tray_bubble_view.cc +++ b/ash/system/tray/tray_bubble_view.cc @@ -389,12 +389,12 @@ gfx::Size TrayBubbleView::GetPreferredSize() { return gfx::Size(params_.bubble_width, height); } -void TrayBubbleView::OnMouseEntered(const views::MouseEvent& event) { +void TrayBubbleView::OnMouseEntered(const ui::MouseEvent& event) { if (host_) host_->OnMouseEnteredView(); } -void TrayBubbleView::OnMouseExited(const views::MouseEvent& event) { +void TrayBubbleView::OnMouseExited(const ui::MouseEvent& event) { if (host_) host_->OnMouseExitedView(); } diff --git a/ash/system/tray/tray_bubble_view.h b/ash/system/tray/tray_bubble_view.h index dccf245c..edcc2c3 100644 --- a/ash/system/tray/tray_bubble_view.h +++ b/ash/system/tray/tray_bubble_view.h @@ -107,8 +107,8 @@ class TrayBubbleView : public views::BubbleDelegateView { // Overridden from views::View. virtual gfx::Size GetPreferredSize() OVERRIDE; - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; protected: diff --git a/ash/system/tray/tray_notification_view.cc b/ash/system/tray/tray_notification_view.cc index 927d0e0..c688c0b 100644 --- a/ash/system/tray/tray_notification_view.cc +++ b/ash/system/tray/tray_notification_view.cc @@ -115,7 +115,7 @@ void TrayNotificationView::ButtonPressed(views::Button* sender, HandleClose(); } -bool TrayNotificationView::OnMousePressed(const views::MouseEvent& event) { +bool TrayNotificationView::OnMousePressed(const ui::MouseEvent& event) { HandleClickAction(); return true; } diff --git a/ash/system/tray/tray_notification_view.h b/ash/system/tray/tray_notification_view.h index 2dd64ad..e6a4893 100644 --- a/ash/system/tray/tray_notification_view.h +++ b/ash/system/tray/tray_notification_view.h @@ -53,7 +53,7 @@ class TrayNotificationView : public views::View, const ui::Event& event) OVERRIDE; // Overridden from views::View. - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; virtual ui::GestureStatus OnGestureEvent( const views::GestureEvent& event) OVERRIDE; diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc index 402aa04..26137e6 100644 --- a/ash/system/tray/tray_views.cc +++ b/ash/system/tray/tray_views.cc @@ -119,21 +119,18 @@ void ActionableView::DrawBorder(gfx::Canvas* canvas, const gfx::Rect& bounds) { bool ActionableView::OnKeyPressed(const ui::KeyEvent& event) { if (event.key_code() == ui::VKEY_SPACE || event.key_code() == ui::VKEY_RETURN) { - // TODO(beng): remove once views::Event is gone. - views::MouseEvent synthetic_event( - ui::ET_MOUSE_RELEASED, 0, 0, ui::EF_LEFT_MOUSE_BUTTON); - return PerformAction(synthetic_event); + return PerformAction(event); } return false; } -bool ActionableView::OnMousePressed(const views::MouseEvent& event) { +bool ActionableView::OnMousePressed(const ui::MouseEvent& event) { // Return true so that this view starts capturing the events. has_capture_ = true; return true; } -void ActionableView::OnMouseReleased(const views::MouseEvent& event) { +void ActionableView::OnMouseReleased(const ui::MouseEvent& event) { if (has_capture_ && GetLocalBounds().Contains(event.location())) PerformAction(event); } @@ -232,14 +229,14 @@ gfx::Size HoverHighlightView::GetPreferredSize() { return size; } -void HoverHighlightView::OnMouseEntered(const views::MouseEvent& event) { +void HoverHighlightView::OnMouseEntered(const ui::MouseEvent& event) { hover_ = true; if (text_highlight_color_ && text_label_) text_label_->SetEnabledColor(text_highlight_color_); SchedulePaint(); } -void HoverHighlightView::OnMouseExited(const views::MouseEvent& event) { +void HoverHighlightView::OnMouseExited(const ui::MouseEvent& event) { hover_ = false; if (text_default_color_ && text_label_) text_label_->SetEnabledColor(text_default_color_); @@ -311,7 +308,7 @@ void FixedSizedScrollView::OnBoundsChanged(const gfx::Rect& previous_bounds) { contents->SetBoundsRect(bounds); } -void FixedSizedScrollView::OnMouseEntered(const views::MouseEvent& event) { +void FixedSizedScrollView::OnMouseEntered(const ui::MouseEvent& event) { // TODO(sad): This is done to make sure that the scroll view scrolls on // mouse-wheel events. This is ugly, and Ben thinks this is weird. There // should be a better fix for this. @@ -346,12 +343,12 @@ gfx::Size TrayPopupTextButton::GetPreferredSize() { return size; } -void TrayPopupTextButton::OnMouseEntered(const views::MouseEvent& event) { +void TrayPopupTextButton::OnMouseEntered(const ui::MouseEvent& event) { hover_ = true; SchedulePaint(); } -void TrayPopupTextButton::OnMouseExited(const views::MouseEvent& event) { +void TrayPopupTextButton::OnMouseExited(const ui::MouseEvent& event) { hover_ = false; SchedulePaint(); } diff --git a/ash/system/tray/tray_views.h b/ash/system/tray/tray_views.h index fde20bf..ba52f5a 100644 --- a/ash/system/tray/tray_views.h +++ b/ash/system/tray/tray_views.h @@ -75,8 +75,8 @@ class ASH_EXPORT ActionableView : public views::View { // Overridden from views::View. virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; virtual void OnMouseCaptureLost() OVERRIDE; virtual ui::GestureStatus OnGestureEvent( const views::GestureEvent& event) OVERRIDE; @@ -126,8 +126,8 @@ class HoverHighlightView : public ActionableView { // Overridden from views::View. virtual gfx::Size GetPreferredSize() OVERRIDE; - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; virtual void OnEnabledChanged() OVERRIDE; virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; virtual void OnFocus() OVERRIDE; @@ -157,7 +157,7 @@ class FixedSizedScrollView : public views::ScrollView { // views::View public method overrides. virtual gfx::Size GetPreferredSize() OVERRIDE; virtual void Layout() OVERRIDE; - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; protected: // views::View protected method overrides. @@ -180,8 +180,8 @@ class TrayPopupTextButton : public views::TextButton { private: // Overridden from views::View. virtual gfx::Size GetPreferredSize() OVERRIDE; - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE; virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc index d9b0541..5274a17 100644 --- a/ash/system/web_notification/web_notification_tray.cc +++ b/ash/system/web_notification/web_notification_tray.cc @@ -430,7 +430,7 @@ class WebNotificationView : public views::View, } // views::View overrides. - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE { + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { tray_->OnClicked(notification_.id); return true; } diff --git a/ash/test/capture_tracking_view.cc b/ash/test/capture_tracking_view.cc index 53afd14..50eaaea 100644 --- a/ash/test/capture_tracking_view.cc +++ b/ash/test/capture_tracking_view.cc @@ -15,7 +15,7 @@ CaptureTrackingView::CaptureTrackingView() CaptureTrackingView::~CaptureTrackingView() { } -bool CaptureTrackingView::OnMousePressed(const views::MouseEvent& event) { +bool CaptureTrackingView::OnMousePressed(const ui::MouseEvent& event) { got_press_ = true; return true; } diff --git a/ash/test/capture_tracking_view.h b/ash/test/capture_tracking_view.h index 5937bff..3d27381 100644 --- a/ash/test/capture_tracking_view.h +++ b/ash/test/capture_tracking_view.h @@ -26,7 +26,7 @@ class CaptureTrackingView : public views::View { void reset() { got_press_ = got_capture_lost_ = false; } // Overridden from views::View - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; virtual void OnMouseCaptureLost() OVERRIDE; private: diff --git a/ash/wm/maximize_bubble_controller.cc b/ash/wm/maximize_bubble_controller.cc index 21c3136..174c7ab 100644 --- a/ash/wm/maximize_bubble_controller.cc +++ b/ash/wm/maximize_bubble_controller.cc @@ -346,8 +346,8 @@ class BubbleDialogButton : public views::ImageButton { // CustomButton overrides: virtual void OnMouseCaptureLost() OVERRIDE; - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; private: // The creating class which needs to get notified in case of a hover event. @@ -730,12 +730,12 @@ void BubbleDialogButton::OnMouseCaptureLost() { views::ImageButton::OnMouseCaptureLost(); } -void BubbleDialogButton::OnMouseEntered(const views::MouseEvent& event) { +void BubbleDialogButton::OnMouseEntered(const ui::MouseEvent& event) { button_row_->ButtonHovered(this); views::ImageButton::OnMouseEntered(event); } -void BubbleDialogButton::OnMouseExited(const views::MouseEvent& event) { +void BubbleDialogButton::OnMouseExited(const ui::MouseEvent& event) { button_row_->ButtonHovered(NULL); views::ImageButton::OnMouseExited(event); } diff --git a/ash/wm/partial_screenshot_view.cc b/ash/wm/partial_screenshot_view.cc index 3c7c321..b519c5b 100644 --- a/ash/wm/partial_screenshot_view.cc +++ b/ash/wm/partial_screenshot_view.cc @@ -59,7 +59,7 @@ void PartialScreenshotView::StartPartialScreenshot( } gfx::NativeCursor PartialScreenshotView::GetCursor( - const views::MouseEvent& event) { + const ui::MouseEvent& event) { // Always use "crosshair" cursor. return ui::kCursorCross; } @@ -96,12 +96,12 @@ void PartialScreenshotView::OnMouseCaptureLost() { Cancel(); } -bool PartialScreenshotView::OnMousePressed(const views::MouseEvent& event) { +bool PartialScreenshotView::OnMousePressed(const ui::MouseEvent& event) { start_position_ = event.location(); return true; } -bool PartialScreenshotView::OnMouseDragged(const views::MouseEvent& event) { +bool PartialScreenshotView::OnMouseDragged(const ui::MouseEvent& event) { current_position_ = event.location(); SchedulePaint(); is_dragging_ = true; @@ -113,7 +113,7 @@ bool PartialScreenshotView::OnMouseWheel(const views::MouseWheelEvent& event) { return true; } -void PartialScreenshotView::OnMouseReleased(const views::MouseEvent& event) { +void PartialScreenshotView::OnMouseReleased(const ui::MouseEvent& event) { Cancel(); if (!is_dragging_) return; diff --git a/ash/wm/partial_screenshot_view.h b/ash/wm/partial_screenshot_view.h index c00d90d..0811dd0 100644 --- a/ash/wm/partial_screenshot_view.h +++ b/ash/wm/partial_screenshot_view.h @@ -28,7 +28,7 @@ class ASH_EXPORT PartialScreenshotView static void StartPartialScreenshot(ScreenshotDelegate* screenshot_delegate); // Overriddden from View: - virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE; + virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; // Overridden from internal::OverlayEventFilter::Delegate: virtual void Cancel() OVERRIDE; @@ -41,10 +41,10 @@ class ASH_EXPORT PartialScreenshotView // Overridden from View: virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; virtual void OnMouseCaptureLost() OVERRIDE; - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; - virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; + virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; virtual bool OnMouseWheel(const views::MouseWheelEvent& event) OVERRIDE; - virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; + virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; bool is_dragging_; gfx::Point start_position_; diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc index 3eaa467..70bfc7a 100644 --- a/ash/wm/system_modal_container_layout_manager_unittest.cc +++ b/ash/wm/system_modal_container_layout_manager_unittest.cc @@ -81,7 +81,7 @@ class EventTestWindow : public TestWindow { } // Overridden from views::View: - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE { + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { mouse_presses_++; return false; } diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc index 1b99de9..b4873cc 100644 --- a/ash/wm/workspace/frame_maximize_button.cc +++ b/ash/wm/workspace/frame_maximize_button.cc @@ -184,7 +184,7 @@ void FrameMaximizeButton::OnWindowDestroying(aura::Window* window) { } } -bool FrameMaximizeButton::OnMousePressed(const views::MouseEvent& event) { +bool FrameMaximizeButton::OnMousePressed(const ui::MouseEvent& event) { is_snap_enabled_ = event.IsLeftMouseButton(); if (is_snap_enabled_) ProcessStartEvent(event); @@ -192,7 +192,7 @@ bool FrameMaximizeButton::OnMousePressed(const views::MouseEvent& event) { return true; } -void FrameMaximizeButton::OnMouseEntered(const views::MouseEvent& event) { +void FrameMaximizeButton::OnMouseEntered(const ui::MouseEvent& event) { ImageButton::OnMouseEntered(event); if (!maximizer_.get()) { DCHECK(GetWidget()); @@ -206,7 +206,7 @@ void FrameMaximizeButton::OnMouseEntered(const views::MouseEvent& event) { } } -void FrameMaximizeButton::OnMouseExited(const views::MouseEvent& event) { +void FrameMaximizeButton::OnMouseExited(const ui::MouseEvent& event) { ImageButton::OnMouseExited(event); // Remove the bubble menu when the button is not pressed and the mouse is not // within the bubble. @@ -227,13 +227,13 @@ void FrameMaximizeButton::OnMouseExited(const views::MouseEvent& event) { } } -bool FrameMaximizeButton::OnMouseDragged(const views::MouseEvent& event) { +bool FrameMaximizeButton::OnMouseDragged(const ui::MouseEvent& event) { if (is_snap_enabled_) ProcessUpdateEvent(event); return ImageButton::OnMouseDragged(event); } -void FrameMaximizeButton::OnMouseReleased(const views::MouseEvent& event) { +void FrameMaximizeButton::OnMouseReleased(const ui::MouseEvent& event) { maximizer_.reset(); if (!ProcessEndEvent(event)) ImageButton::OnMouseReleased(event); diff --git a/ash/wm/workspace/frame_maximize_button.h b/ash/wm/workspace/frame_maximize_button.h index 98b94a5..5d6f69b 100644 --- a/ash/wm/workspace/frame_maximize_button.h +++ b/ash/wm/workspace/frame_maximize_button.h @@ -54,11 +54,11 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton, virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; // ImageButton overrides: - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; - virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; - virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; + virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; + virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; virtual void OnMouseCaptureLost() OVERRIDE; virtual ui::GestureStatus OnGestureEvent( const views::GestureEvent& event) OVERRIDE; diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc index 909e040..c2939bc 100644 --- a/ash/wm/workspace/multi_window_resize_controller.cc +++ b/ash/wm/workspace/multi_window_resize_controller.cc @@ -79,26 +79,26 @@ class MultiWindowResizeController::ResizeView : public views::View { virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { canvas->DrawImageInt(*image_, 0, 0); } - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE { + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { gfx::Point location(event.location()); views::View::ConvertPointToScreen(this, &location); controller_->StartResize(location); return true; } - virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE { + virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE { gfx::Point location(event.location()); views::View::ConvertPointToScreen(this, &location); controller_->Resize(location, event.flags()); return true; } - virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE { + virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE { controller_->CompleteResize(event.flags()); } virtual void OnMouseCaptureLost() OVERRIDE { controller_->CancelResize(); } virtual gfx::NativeCursor GetCursor( - const views::MouseEvent& event) OVERRIDE { + const ui::MouseEvent& event) OVERRIDE { int component = (direction_ == LEFT_RIGHT) ? HTRIGHT : HTBOTTOM; return aura::shared::CompoundEventFilter::CursorForWindowComponent( component); |