| Index: ash/system/tray/tray_background_view.cc
|
| diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc
|
| index b19b137cfe596d95c38b415745a76a77af585508..a2f602d0a0ced1e207a2a8ce2583e3b1c9ff2992 100644
|
| --- a/ash/system/tray/tray_background_view.cc
|
| +++ b/ash/system/tray/tray_background_view.cc
|
| @@ -17,6 +17,7 @@
|
| #include "ash/system/tray/tray_constants.h"
|
| #include "ash/system/tray/tray_event_filter.h"
|
| #include "ash/wm/window_animations.h"
|
| +#include "base/command_line.h"
|
| #include "grit/ash_resources.h"
|
| #include "ui/accessibility/ax_view_state.h"
|
| #include "ui/aura/window.h"
|
| @@ -25,6 +26,7 @@
|
| #include "ui/compositor/layer.h"
|
| #include "ui/compositor/layer_animation_element.h"
|
| #include "ui/compositor/scoped_layer_animation_settings.h"
|
| +#include "ui/events/event_constants.h"
|
| #include "ui/gfx/animation/tween.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/image/image_skia.h"
|
| @@ -426,6 +428,20 @@ gfx::Rect TrayBackgroundView::GetFocusBounds() {
|
| return GetContentsBounds();
|
| }
|
|
|
| +void TrayBackgroundView::OnGestureEvent(ui::GestureEvent* event) {
|
| + if (event->type() == ui::ET_GESTURE_TAP_DOWN &&
|
| + CommandLine::ForCurrentProcess()->
|
| + HasSwitch(switches::kAshEnableTouchViewTouchFeedback)) {
|
| + SetDrawBackgroundAsActive(true);
|
| + } else if ((event->type() == ui::ET_GESTURE_SCROLL_BEGIN ||
|
| + event->type() == ui::ET_GESTURE_TAP_CANCEL) &&
|
| + CommandLine::ForCurrentProcess()->
|
| + HasSwitch(switches::kAshEnableTouchViewTouchFeedback)) {
|
| + SetDrawBackgroundAsActive(false);
|
| + }
|
| + ActionableView::OnGestureEvent(event);
|
| +}
|
| +
|
| void TrayBackgroundView::UpdateBackground(int alpha) {
|
| // The animator should never fire when the alternate shelf layout is used.
|
| if (!background_ || draw_background_as_active_)
|
| @@ -628,6 +644,8 @@ TrayBubbleView::AnchorAlignment TrayBackgroundView::GetAnchorAlignment() const {
|
| }
|
|
|
| void TrayBackgroundView::SetDrawBackgroundAsActive(bool visible) {
|
| + if (draw_background_as_active_ == visible)
|
| + return;
|
| draw_background_as_active_ = visible;
|
| if (!background_)
|
| return;
|
|
|