Index: ash/launcher/launcher_button.cc |
diff --git a/ash/launcher/launcher_button.cc b/ash/launcher/launcher_button.cc |
index 4f482188ac37b13b2d0e6ae2ceec038e387df4bb..7318bc7195951ca8fb2bc59d02b20d389736d88a 100644 |
--- a/ash/launcher/launcher_button.cc |
+++ b/ash/launcher/launcher_button.cc |
@@ -10,10 +10,12 @@ |
#include "ash/launcher/launcher_button_host.h" |
#include "grit/ui_resources.h" |
#include "skia/ext/image_operations.h" |
+#include "ui/aura/event.h" |
#include "ui/base/accessibility/accessible_view_state.h" |
#include "ui/base/animation/animation_delegate.h" |
#include "ui/base/animation/throb_animation.h" |
#include "ui/base/resource/resource_bundle.h" |
+#include "ui/base/events.h" |
flackr
2012/07/05 14:11:12
Sort
Kevin Greer
2012/07/05 18:35:04
Done.
|
#include "ui/compositor/layer.h" |
#include "ui/compositor/layer_animation_element.h" |
#include "ui/compositor/layer_animation_observer.h" |
@@ -325,6 +327,18 @@ gfx::Rect LauncherButton::GetIconBounds() const { |
return icon_view_->bounds(); |
} |
+ui::GestureStatus LauncherButton::OnGestureEvent( |
+ const views::GestureEvent& event) { |
+ ui::GestureStatus status = CustomButton::OnGestureEvent(event); |
+ |
+ if (event.type() == ui::ET_GESTURE_TAP_DOWN) |
+ AddState(STATE_HOVERED); |
flackr
2012/07/05 14:11:12
Since this class derives from CustomButton, I thin
Kevin Greer
2012/07/05 21:06:05
LauncherButton creates its own new set of states t
flackr
2012/07/06 03:12:59
What I have in mind is to use CustomButton's track
|
+ else if (event.type() == ui::ET_GESTURE_END) |
+ ClearState(STATE_HOVERED); |
+ |
+ return status; |
+} |
+ |
bool LauncherButton::OnMousePressed(const views::MouseEvent& event) { |
CustomButton::OnMousePressed(event); |
host_->MousePressedOnButton(this, event); |