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

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

Issue 11229022: Move ash/system/web_notification message_center to ui/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again. Created 8 years, 2 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/tray_background_view.h ('k') | ash/system/tray/tray_bubble_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/system/tray/tray_background_view.h ('k') | ash/system/tray/tray_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698