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

Unified Diff: ash/launcher/launcher_button.cc

Issue 10702102: Added hover feedback on touch to launcher buttons. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge with trunk Created 8 years, 5 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/launcher/launcher_button.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_button.cc
diff --git a/ash/launcher/launcher_button.cc b/ash/launcher/launcher_button.cc
index dd20a38199a92e74358f98b1f047a0cd05b6207d..00bd697c2811980438e43aff0628f5e03faa5302 100644
--- a/ash/launcher/launcher_button.cc
+++ b/ash/launcher/launcher_button.cc
@@ -9,9 +9,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/events.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_element.h"
@@ -366,6 +369,12 @@ void LauncherButton::OnMouseExited(const views::MouseEvent& event) {
ui::GestureStatus LauncherButton::OnGestureEvent(
const views::GestureEvent& event) {
switch (event.type()) {
+ case ui::ET_GESTURE_TAP_DOWN:
+ AddState(STATE_HOVERED);
+ return CustomButton::OnGestureEvent(event);
+ case ui::ET_GESTURE_END:
+ ClearState(STATE_HOVERED);
+ return CustomButton::OnGestureEvent(event);
case ui::ET_GESTURE_SCROLL_BEGIN:
host_->PointerPressedOnButton(this, LauncherButtonHost::TOUCH, event);
return ui::GESTURE_STATUS_CONSUMED;
« no previous file with comments | « ash/launcher/launcher_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698