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

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

Issue 2448373002: chromeos: Move ownership of system tray width from chrome to ash (Closed)
Patch Set: comment about DIPS Created 4 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
Index: ash/common/system/tray/system_tray.cc
diff --git a/ash/common/system/tray/system_tray.cc b/ash/common/system/tray/system_tray.cc
index b29adb60a1da6b0192eba1cb27e2e97c4b6deb10..db02bb6870cb788044bd8041ab7f7e03aa0119a7 100644
--- a/ash/common/system/tray/system_tray.cc
+++ b/ash/common/system/tray/system_tray.cc
@@ -539,11 +539,12 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
// (like network) replaces most of the menu.
full_system_tray_menu_ = items.size() > 1;
// The menu width is fixed, and it is a per language setting.
- int menu_width = std::max(
- MaterialDesignController::IsSystemTrayMenuMaterial()
- ? kMinimumSystemTrayMenuWidthMd
- : kMinimumSystemTrayMenuWidth,
- WmShell::Get()->system_tray_delegate()->GetSystemTrayMenuWidth());
+ int menu_width =
+ std::max(MaterialDesignController::IsSystemTrayMenuMaterial()
+ ? kMinimumSystemTrayMenuWidthMd
+ : kMinimumSystemTrayMenuWidth,
+ l10n_util::GetLocalizedContentsWidthInPixels(
+ IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS));
TrayBubbleView::InitParams init_params(TrayBubbleView::ANCHOR_TYPE_TRAY,
GetAnchorAlignment(), menu_width,
« no previous file with comments | « ash/common/system/tray/default_system_tray_delegate.cc ('k') | ash/common/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698