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

Unified Diff: ash/system/tray/system_tray.cc

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.h ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 47157ea46ff28178488112a6d98057d2b5d2eb88..6419acd38e1bf761abacdfd3c58868a9249ab5ef 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -320,16 +320,6 @@ bool SystemTray::HasNotificationBubble() const {
return notification_bubble_.get() != NULL;
}
-bool SystemTray::IsPressed() {
- // Only when a full system tray bubble gets shown true will be returned.
- // Small bubbles (like audio modifications via keyboard) should return false.
- // Since showing the e.g. network portion of the system tray menu will convert
- // the |system_bubble_| from type |BUBBLE_TYPE_DEFAULT| into
- // |BUBBLE_TYPE_DETAILED| the full tray cannot reliably be checked trhough the
- // type. As such |full_system_tray_menu_| gets checked here.
- return HasSystemBubble() && full_system_tray_menu_;
-}
-
internal::SystemTrayBubble* SystemTray::GetSystemBubble() {
if (!system_bubble_)
return NULL;
@@ -482,6 +472,11 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
if (!notification_bubble_)
UpdateWebNotifications();
GetShelfLayoutManager()->UpdateAutoHideState();
+
+ // When we show the system menu in our alternate shelf layout, we need to
+ // tint the background.
+ if (full_system_tray_menu_)
+ SetDrawBackgroundAsActive(true);
}
void SystemTray::UpdateNotificationBubble() {
@@ -591,6 +586,12 @@ void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) {
DestroySystemBubble();
UpdateNotificationBubble(); // State changed, re-create notifications.
GetShelfLayoutManager()->UpdateAutoHideState();
+ // When closing a system bubble with the alternate shelf layout, we need to
+ // turn off the active tinting of the shelf.
+ if (full_system_tray_menu_) {
+ SetDrawBackgroundAsActive(false);
+ full_system_tray_menu_ = false;
+ }
} else if (notification_bubble_.get() &&
bubble_view == notification_bubble_->bubble_view()) {
DestroyNotificationBubble();
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698