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

Unified Diff: ash/system/tray/tray_views.cc

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/tray_views.h ('k') | ash/system/web_notification/web_notification_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_views.cc
===================================================================
--- ash/system/tray/tray_views.cc (revision 151406)
+++ ash/system/tray/tray_views.cc (working copy)
@@ -119,21 +119,18 @@
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 @@
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 @@
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 @@
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();
}
« no previous file with comments | « ash/system/tray/tray_views.h ('k') | ash/system/web_notification/web_notification_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698