summaryrefslogtreecommitdiffstats
path: root/ash/system/tray/system_tray.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 20:52:15 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 20:52:15 +0000
commita160baecdd408a80a6861635a398011622f04718 (patch)
tree8fd64fc6a97cdb3a5900b3303edb70ba267bd28e /ash/system/tray/system_tray.h
parent1cd7a4bdffafd7c84f0846d9cce59c921ae8ac0e (diff)
downloadchromium_src-a160baecdd408a80a6861635a398011622f04718.zip
chromium_src-a160baecdd408a80a6861635a398011622f04718.tar.gz
chromium_src-a160baecdd408a80a6861635a398011622f04718.tar.bz2
Makes the tray not paint a background if the launcher is painting a
background. I refactored the animation class to allow both launcher and tray to share it. BUG=118357 TEST=visual test, see bug. R=sadrul@chromium.org Review URL: https://chromiumcodereview.appspot.com/9820002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/tray/system_tray.h')
-rw-r--r--ash/system/tray/system_tray.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h
index b108600..fc2fdc1 100644
--- a/ash/system/tray/system_tray.h
+++ b/ash/system/tray/system_tray.h
@@ -6,6 +6,7 @@
#define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
#pragma once
+#include "ash/launcher/background_animator.h"
#include "ash/ash_export.h"
#include "ash/system/user/login_status.h"
#include "base/basictypes.h"
@@ -32,11 +33,13 @@ class UserObserver;
class SystemTrayItem;
namespace internal {
+class SystemTrayBackground;
class SystemTrayBubble;
}
class ASH_EXPORT SystemTray : public views::View,
- public views::Widget::Observer {
+ public views::Widget::Observer,
+ public internal::BackgroundAnimatorDelegate {
public:
SystemTray();
virtual ~SystemTray();
@@ -61,6 +64,12 @@ class ASH_EXPORT SystemTray : public views::View,
const ScopedVector<SystemTrayItem>& items() const { return items_; }
+ // Sets whether the tray paints a background. Default is true, but is set to
+ // false if a window overlaps the shelf.
+ void SetPaintsBackground(
+ bool value,
+ internal::BackgroundAnimator::ChangeType change_type);
+
AccessibilityObserver* accessibility_observer() const {
return accessibility_observer_;
}
@@ -113,6 +122,9 @@ class ASH_EXPORT SystemTray : public views::View,
// Overridden from views::Widget::Observer.
virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
+ // Overridden from internal::BackgroundAnimatorDelegate.
+ virtual void UpdateBackground(int alpha) OVERRIDE;
+
ScopedVector<SystemTrayItem> items_;
// The container for all the tray views of the items.
@@ -135,6 +147,14 @@ class ASH_EXPORT SystemTray : public views::View,
internal::SystemTrayBubble* bubble_;
views::Widget* popup_;
+ // Is the mouse in the tray?
+ bool mouse_in_tray_;
+
+ // Owned by the view it's installed on.
+ internal::SystemTrayBackground* background_;
+
+ internal::BackgroundAnimator background_animator_;
+
DISALLOW_COPY_AND_ASSIGN(SystemTray);
};