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

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

Issue 2978363002: Revert of Add a row in the network tray to inform users to turn Bluetooth on to enable Tether. (Closed)
Patch Set: Created 3 years, 5 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_details_view.h ('k') | ash/system/tray/tray_info_label.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_details_view.cc
diff --git a/ash/system/tray/tray_details_view.cc b/ash/system/tray/tray_details_view.cc
index 3f154afdf79cbbdd26c406432a929427e0aeaf21..f4507f0779185c5f8924c021d5a87d7975fa7729 100644
--- a/ash/system/tray/tray_details_view.cc
+++ b/ash/system/tray/tray_details_view.cc
@@ -237,6 +237,35 @@
} // namespace
+////////////////////////////////////////////////////////////////////////////////
+// TrayDetailsView::InfoLabel:
+
+TrayDetailsView::InfoLabel::InfoLabel(int message_id)
+ : label_(TrayPopupUtils::CreateDefaultLabel()) {
+ SetLayoutManager(new views::FillLayout);
+
+ TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SYSTEM_INFO);
+ style.SetupLabel(label_);
+
+ TriView* tri_view = TrayPopupUtils::CreateMultiTargetRowView();
+ tri_view->SetInsets(gfx::Insets(0,
+ kMenuExtraMarginFromLeftEdge +
+ kTrayPopupPaddingHorizontal -
+ kTrayPopupLabelHorizontalPadding,
+ 0, kTrayPopupPaddingHorizontal));
+ tri_view->SetContainerVisible(TriView::Container::START, false);
+ tri_view->SetContainerVisible(TriView::Container::END, false);
+ tri_view->AddView(TriView::Container::CENTER, label_);
+ AddChildView(tri_view);
+
+ SetMessage(message_id);
+}
+
+TrayDetailsView::InfoLabel::~InfoLabel() {}
+
+void TrayDetailsView::InfoLabel::SetMessage(int message_id) {
+ label_->SetText(l10n_util::GetStringUTF16(message_id));
+}
////////////////////////////////////////////////////////////////////////////////
// TrayDetailsView:
« no previous file with comments | « ash/system/tray/tray_details_view.h ('k') | ash/system/tray/tray_info_label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698