summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/system/tray/system_tray.cc4
-rw-r--r--ash/system/tray/system_tray.h1
-rw-r--r--ash/system/tray/tray_background_view.h3
-rw-r--r--ash/system/tray/tray_bubble_wrapper.cc6
-rw-r--r--ash/system/tray/tray_bubble_wrapper.h2
5 files changed, 16 insertions, 0 deletions
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index e07a2d6..fa78257 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -587,6 +587,10 @@ base::string16 SystemTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME);
}
+void SystemTray::BubbleResized(const TrayBubbleView* bubble_view) {
+ UpdateWebNotifications();
+}
+
void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) {
if (system_bubble_.get() && bubble_view == system_bubble_->bubble_view()) {
DestroySystemBubble();
diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h
index f6b47fe..8656f8b 100644
--- a/ash/system/tray/system_tray.h
+++ b/ash/system/tray/system_tray.h
@@ -138,6 +138,7 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView,
virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
virtual void AnchorUpdated() OVERRIDE;
virtual base::string16 GetAccessibleNameForTray() OVERRIDE;
+ virtual void BubbleResized(const views::TrayBubbleView* bubble_view) OVERRIDE;
virtual void HideBubbleWithView(
const views::TrayBubbleView* bubble_view) OVERRIDE;
virtual bool ClickedOutsideBubble() OVERRIDE;
diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h
index 7b29495..b459684 100644
--- a/ash/system/tray/tray_background_view.h
+++ b/ash/system/tray/tray_background_view.h
@@ -89,6 +89,9 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// Called from GetAccessibleState, must return a valid accessible name.
virtual base::string16 GetAccessibleNameForTray() = 0;
+ // Called when the bubble is resized.
+ virtual void BubbleResized(const views::TrayBubbleView* bubble_view) {}
+
// Hides the bubble associated with |bubble_view|. Called when the widget
// is closed.
virtual void HideBubbleWithView(const views::TrayBubbleView* bubble_view) = 0;
diff --git a/ash/system/tray/tray_bubble_wrapper.cc b/ash/system/tray/tray_bubble_wrapper.cc
index 5d641ee..c5738e5 100644
--- a/ash/system/tray/tray_bubble_wrapper.cc
+++ b/ash/system/tray/tray_bubble_wrapper.cc
@@ -53,5 +53,11 @@ void TrayBubbleWrapper::OnWidgetDestroying(views::Widget* widget) {
tray_->HideBubbleWithView(bubble_view_); // May destroy |bubble_view_|
}
+void TrayBubbleWrapper::OnWidgetBoundsChanged(views::Widget* widget,
+ const gfx::Rect& new_bounds) {
+ DCHECK_EQ(bubble_widget_, widget);
+ tray_->BubbleResized(bubble_view_);
+}
+
} // namespace internal
} // namespace ash
diff --git a/ash/system/tray/tray_bubble_wrapper.h b/ash/system/tray/tray_bubble_wrapper.h
index baa5416..9ce443a 100644
--- a/ash/system/tray/tray_bubble_wrapper.h
+++ b/ash/system/tray/tray_bubble_wrapper.h
@@ -29,6 +29,8 @@ class TrayBubbleWrapper : public views::WidgetObserver {
// views::WidgetObserver overrides:
virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
+ virtual void OnWidgetBoundsChanged(views::Widget* widget,
+ const gfx::Rect& new_bounds) OVERRIDE;
const TrayBackgroundView* tray() const { return tray_; }
TrayBackgroundView* tray() { return tray_; }