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

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

Issue 2661023006: Remove unused references to NativeTheme in TrayPopupItemStyle. (Closed)
Patch Set: slight improvement Created 3 years, 11 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/common/system/tray/tray_details_view.h ('k') | ash/common/system/tray/tray_item_more.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_details_view.cc
diff --git a/ash/common/system/tray/tray_details_view.cc b/ash/common/system/tray/tray_details_view.cc
index 4a5fecd1f6269612458207a5e85c44634a5715f1..5128f12c8bd630e663337580dcfe48031c9610b0 100644
--- a/ash/common/system/tray/tray_details_view.cc
+++ b/ash/common/system/tray/tray_details_view.cc
@@ -295,7 +295,6 @@ TrayDetailsView::TrayDetailsView(SystemTrayItem* owner)
progress_bar_(nullptr),
scroll_border_(nullptr),
tri_view_(nullptr),
- label_(nullptr),
back_button_(nullptr) {
SetLayoutManager(box_layout_);
set_background(views::Background::CreateSolidBackground(kBackgroundColor));
@@ -333,10 +332,11 @@ void TrayDetailsView::CreateTitleRow(int string_id) {
tri_view_->AddView(TriView::Container::START, back_button_);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- label_ = TrayPopupUtils::CreateDefaultLabel();
- label_->SetText(rb.GetLocalizedString(string_id));
- UpdateStyle();
- tri_view_->AddView(TriView::Container::CENTER, label_);
+ auto label = TrayPopupUtils::CreateDefaultLabel();
+ label->SetText(rb.GetLocalizedString(string_id));
+ TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::TITLE);
+ style.SetupLabel(label);
+ tri_view_->AddView(TriView::Container::CENTER, label);
tri_view_->SetContainerVisible(TriView::Container::END, false);
@@ -399,7 +399,6 @@ void TrayDetailsView::Reset() {
scroll_content_ = nullptr;
progress_bar_ = nullptr;
back_button_ = nullptr;
- label_ = nullptr;
tri_view_ = nullptr;
}
@@ -437,20 +436,6 @@ views::CustomButton* TrayDetailsView::CreateHelpButton(LoginStatus status) {
return button;
}
-void TrayDetailsView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
- if (UseMd())
- UpdateStyle();
-}
-
-void TrayDetailsView::UpdateStyle() {
- if (!GetNativeTheme() || !label_)
- return;
-
- TrayPopupItemStyle style(GetNativeTheme(),
- TrayPopupItemStyle::FontStyle::TITLE);
- style.SetupLabel(label_);
-}
-
void TrayDetailsView::HandleViewClicked(views::View* view) {
NOTREACHED();
}
« no previous file with comments | « ash/common/system/tray/tray_details_view.h ('k') | ash/common/system/tray/tray_item_more.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698