Index: ash/system/tray/tray_background_view.cc |
diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc |
index 6abc2be99117a612ed83914f88e9b3e7455430eb..bb15355135a8d1a95c506553f12724eacc880b9b 100644 |
--- a/ash/system/tray/tray_background_view.cc |
+++ b/ash/system/tray/tray_background_view.cc |
@@ -11,8 +11,11 @@ |
#include "ash/system/status_area_widget.h" |
#include "ash/system/status_area_widget_delegate.h" |
#include "ash/system/tray/tray_constants.h" |
+#include "ash/wm/property_util.h" |
+#include "ash/wm/shelf_layout_manager.h" |
#include "ash/wm/window_animations.h" |
#include "ui/aura/event_filter.h" |
+#include "ui/aura/root_window.h" |
#include "ui/aura/window.h" |
#include "ui/base/accessibility/accessible_view_state.h" |
#include "ui/gfx/canvas.h" |
@@ -36,7 +39,7 @@ const int kAnimationDurationForPopupMS = 200; |
} // namespace |
-using message_center::TrayBubbleView; |
+using views::TrayBubbleView; |
namespace ash { |
namespace internal { |
@@ -53,6 +56,11 @@ class TrayBackgroundView::TrayWidgetObserver : public views::WidgetObserver { |
host_->AnchorUpdated(); |
} |
+ virtual void OnWidgetVisibilityChanged(views::Widget* widget, |
+ bool visible) OVERRIDE { |
+ host_->AnchorUpdated(); |
+ } |
+ |
private: |
TrayBackgroundView* host_; |
@@ -355,5 +363,14 @@ TrayBubbleView::AnchorAlignment TrayBackgroundView::GetAnchorAlignment() const { |
return TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM; |
} |
+void TrayBackgroundView::UpdateBubbleViewArrow( |
+ views::TrayBubbleView* bubble_view) { |
+ aura::RootWindow* root_window = |
+ bubble_view->GetWidget()->GetNativeView()->GetRootWindow(); |
+ ash::internal::ShelfLayoutManager* shelf = |
+ ash::GetRootWindowController(root_window)->shelf(); |
+ bubble_view->SetPaintArrow(shelf->IsVisible()); |
+} |
+ |
} // namespace internal |
} // namespace ash |