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

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

Issue 23531033: Fixing various problems with the new shelf layout in conjunction with the blue tray background on b… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed comment Created 7 years, 3 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/system_tray.cc ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b0f28067f6124ae20995665e761e81806a7bf755..7b294954b1b7c4f215749ab6a9ade037ae22baa1 100644
--- a/ash/system/tray/tray_background_view.h
+++ b/ash/system/tray/tray_background_view.h
@@ -124,8 +124,11 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// Returns the bubble anchor alignment based on |shelf_alignment_|.
views::TrayBubbleView::AnchorAlignment GetAnchorAlignment() const;
- // Updates the view visual based on the visibility of the bubble.
- void SetBubbleVisible(bool visible);
+ // Forces the background to be drawn active if set to true.
+ void SetDrawBackgroundAsActive(bool visible);
+
+ // Returns true when the the background was overridden to be drawn as active.
+ bool draw_background_as_active() const {return draw_background_as_active_; }
StatusAreaWidget* status_area_widget() {
return status_area_widget_;
@@ -139,12 +142,9 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
ShelfLayoutManager* GetShelfLayoutManager();
- // Updates the arrow visibilty based on the launcher visibilty.
+ // Updates the arrow visibility based on the launcher visibility.
void UpdateBubbleViewArrow(views::TrayBubbleView* bubble_view);
- // Provides the background with a function to query for pressed state.
- virtual bool IsPressed();
-
private:
class TrayWidgetObserver;
@@ -164,10 +164,17 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// Owned by the view passed to SetContents().
internal::TrayBackground* background_;
+ // Animators for the background. They are only used for the old shelf layout.
internal::BackgroundAnimator hide_background_animator_;
internal::BackgroundAnimator hover_background_animator_;
+
+ // True if the background gets hovered.
bool hovered_;
- bool pressed_;
+
+ // This variable stores the activation override which will tint the background
+ // differently if set to true.
+ bool draw_background_as_active_;
+
scoped_ptr<TrayWidgetObserver> widget_observer_;
scoped_ptr<TrayEventFilter> tray_event_filter_;
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698