| Index: ash/system/tray/system_tray.h
|
| diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h
|
| index b9dbab2a672805757c6b88f9820440078fbfe132..97a0046c0cf86d824220684218a1442e7ca8eee9 100644
|
| --- a/ash/system/tray/system_tray.h
|
| +++ b/ash/system/tray/system_tray.h
|
| @@ -12,10 +12,8 @@
|
| #include "ash/system/user/login_status.h"
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| -#include "base/message_pump_observer.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "ui/views/view.h"
|
| -#include "ui/views/widget/widget.h"
|
|
|
| #include <vector>
|
|
|
| @@ -42,9 +40,7 @@ class SystemTrayBubble;
|
|
|
| class ASH_EXPORT SystemTray : NON_EXPORTED_BASE(
|
| public internal::ActionableView),
|
| - public views::Widget::Observer,
|
| - public internal::BackgroundAnimatorDelegate,
|
| - public base::MessagePumpObserver {
|
| + public internal::BackgroundAnimatorDelegate {
|
| public:
|
| SystemTray();
|
| virtual ~SystemTray();
|
| @@ -77,6 +73,11 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE(
|
| // Updates the items when the login status of the system changes.
|
| void UpdateAfterLoginStatusChange(user::LoginStatus login_status);
|
|
|
| + // Called when the widget associated with |bubble| closes. |bubble| should
|
| + // always == |bubble_|. This triggers destroying |bubble_| and hiding the
|
| + // launcher if necessary.
|
| + void RemoveBubble(internal::SystemTrayBubble* bubble);
|
| +
|
| const ScopedVector<SystemTrayItem>& items() const { return items_; }
|
|
|
| // Sets whether the tray paints a background. Default is true, but is set to
|
| @@ -86,7 +87,7 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE(
|
| internal::BackgroundAnimator::ChangeType change_type);
|
|
|
| // Returns true if the launcher should show.
|
| - bool should_show_launcher() const { return popup_ && should_show_launcher_; }
|
| + bool should_show_launcher() const { return bubble_ && should_show_launcher_; }
|
|
|
| views::Widget* widget() const { return widget_; }
|
|
|
| @@ -139,19 +140,9 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE(
|
| virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
|
| virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
|
|
|
| - // Overridden from views::Widget::Observer.
|
| - virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
|
| - virtual void OnWidgetVisibilityChanged(views::Widget* widget,
|
| - bool visible) OVERRIDE;
|
| -
|
| // Overridden from internal::BackgroundAnimatorDelegate.
|
| virtual void UpdateBackground(int alpha) OVERRIDE;
|
|
|
| - // Overidden from base::MessagePumpObserver
|
| - virtual base::EventStatus WillProcessEvent(
|
| - const base::NativeEvent& event) OVERRIDE;
|
| - virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
|
| -
|
| ScopedVector<SystemTrayItem> items_;
|
|
|
| // The container for all the tray views of the items.
|
| @@ -175,7 +166,6 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE(
|
|
|
| // The popup widget and the delegate.
|
| internal::SystemTrayBubble* bubble_;
|
| - views::Widget* popup_;
|
|
|
| // Owned by the view it's installed on.
|
| internal::SystemTrayBackground* background_;
|
|
|