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

Unified Diff: ash/system/chromeos/network/tray_sms.cc

Issue 11377133: Customize user details in ash system bubble for public account mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-uploading to try and unstuck the CQ. Created 8 years 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/ash_strings.grd ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/tray_sms.cc
diff --git a/ash/system/chromeos/network/tray_sms.cc b/ash/system/chromeos/network/tray_sms.cc
index 31676173944c9e3f17ce087be81c6e6e081f7f1b..7b794ff934f36797d050ae2b7b2d024f069c9607 100644
--- a/ash/system/chromeos/network/tray_sms.cc
+++ b/ash/system/chromeos/network/tray_sms.cc
@@ -6,6 +6,7 @@
#include "ash/ash_switches.h"
#include "ash/system/tray/system_tray.h"
+#include "ash/system/tray/system_tray_bubble.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_details_view.h"
#include "ash/system/tray/tray_item_more.h"
@@ -19,6 +20,7 @@
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/views/bubble/tray_bubble_view.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
@@ -120,9 +122,9 @@ class TraySms::SmsMessageView : public views::View,
close_button->SetImage(views::CustomButton::STATE_NORMAL,
ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
IDR_AURA_WINDOW_CLOSE));
-
- int msg_width = kTrayPopupWidth - kNotificationIconWidth -
- kTrayPopupPaddingHorizontal * 2;
+ const int msg_width = owner_->system_tray()->GetSystemBubble()->
+ bubble_view()->GetPreferredSize().width() -
+ (kNotificationIconWidth + kTrayPopupPaddingHorizontal * 2);
message_label_->SizeToFit(msg_width);
views::GridLayout* layout = new views::GridLayout(this);
« no previous file with comments | « ash/ash_strings.grd ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698