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

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

Issue 10417013: Show fixed arrow for uber tray bubble if shelf alignment is vertical. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « no previous file | ash/system/tray/system_tray_bubble.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index ae1b69e0dc84c9ebc1712d711853a4d826439dac..753fb484225677cfeb3eefc19cc658bd2b9547ec 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -453,7 +453,8 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
ash::Shell::GetInstance()->tray_delegate();
views::View* anchor = tray_container_;
SystemTrayBubble::InitParams init_params(
- SystemTrayBubble::ANCHOR_TYPE_TRAY);
+ SystemTrayBubble::ANCHOR_TYPE_TRAY,
+ shelf_alignment());
init_params.anchor = anchor;
init_params.can_activate = can_activate;
init_params.login_status = delegate->GetUserLoginStatus();
@@ -496,7 +497,7 @@ void SystemTray::UpdateNotificationBubble() {
anchor = tray_container_;
anchor_type = SystemTrayBubble::ANCHOR_TYPE_TRAY;
}
- SystemTrayBubble::InitParams init_params(anchor_type);
+ SystemTrayBubble::InitParams init_params(anchor_type, shelf_alignment());
init_params.anchor = anchor;
init_params.login_status =
ash::Shell::GetInstance()->tray_delegate()->GetUserLoginStatus();
@@ -539,8 +540,6 @@ bool SystemTray::PerformAction(const views::Event& event) {
if (shelf_alignment() == SHELF_ALIGNMENT_BOTTOM)
arrow_offset = base::i18n::IsRTL() ?
located_event.x() : tray_container_->width() - located_event.x();
- else
- arrow_offset = tray_container_->height() - located_event.y();
}
ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset);
}
« no previous file with comments | « no previous file | ash/system/tray/system_tray_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698