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

Unified Diff: ash/system/tray/tray_background_view.h

Issue 515573002: Use active state on touch start for tray icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement Touch Feedback on TrayBackgroundView Created 6 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
Index: ash/system/tray/tray_background_view.h
diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h
index da4eaf547ce28d0d34e9b4df2c69263aab9cf3bb..a17a01497b8ee37dd7568b65b318dd32981f1c3d 100644
--- a/ash/system/tray/tray_background_view.h
+++ b/ash/system/tray/tray_background_view.h
@@ -8,6 +8,7 @@
#include "ash/ash_export.h"
#include "ash/shelf/background_animator.h"
#include "ash/shelf/shelf_types.h"
+#include "ash/shell_observer.h"
#include "ash/system/tray/actionable_view.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/views/bubble/tray_bubble_view.h"
@@ -25,7 +26,8 @@ class TrayBackground;
// items can override PerformAction when clicked on.
class ASH_EXPORT TrayBackgroundView : public ActionableView,
public BackgroundAnimatorDelegate,
- public ui::ImplicitAnimationObserver {
+ public ui::ImplicitAnimationObserver,
+ public ShellObserver {
public:
static const char kViewClassName[];
@@ -77,10 +79,15 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// ActionableView:
virtual bool PerformAction(const ui::Event& event) OVERRIDE;
virtual gfx::Rect GetFocusBounds() OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
// BackgroundAnimatorDelegate:
virtual void UpdateBackground(int alpha) OVERRIDE;
+ // ShellObserver:
+ virtual void OnMaximizeModeStarted() OVERRIDE;
+ virtual void OnMaximizeModeEnded() OVERRIDE;
+
// Called whenever the shelf alignment changes.
virtual void SetShelfAlignment(ShelfAlignment alignment);
@@ -185,6 +192,10 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// differently if set to true.
bool draw_background_as_active_;
+ // True if maximize mode is enabled, and touch view feedback has been enabled.
+ // When enabled touch gestures will toggle rendering the background as active.
+ bool touch_feedback_enabled_;
+
scoped_ptr<TrayWidgetObserver> widget_observer_;
scoped_ptr<TrayEventFilter> tray_event_filter_;

Powered by Google App Engine
This is Rietveld 408576698