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

Unified Diff: ash/common/system/chromeos/power/power_status_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
Index: ash/common/system/chromeos/power/power_status_view.cc
diff --git a/ash/common/system/chromeos/power/power_status_view.cc b/ash/common/system/chromeos/power/power_status_view.cc
index ade3d0b021a93de634a267cd9a47af7e350aad20..5e01f6d5fd9069c031fa220bd9e3ab184974ccd3 100644
--- a/ash/common/system/chromeos/power/power_status_view.cc
+++ b/ash/common/system/chromeos/power/power_status_view.cc
@@ -139,16 +139,14 @@ void PowerStatusView::UpdateText() {
time_status_label_->SetVisible(!battery_time_status.empty());
time_status_label_->SetText(battery_time_status);
- if (MaterialDesignController::IsSystemTrayMenuMaterial())
+ if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
accessible_name_ = PowerStatus::Get()->GetAccessibleNameString(true);
-}
-void PowerStatusView::UpdateStyle() {
- TrayPopupItemStyle style(GetNativeTheme(),
- TrayPopupItemStyle::FontStyle::SYSTEM_INFO);
- style.SetupLabel(percentage_label_);
- style.SetupLabel(separator_label_);
- style.SetupLabel(time_status_label_);
+ TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SYSTEM_INFO);
+ style.SetupLabel(percentage_label_);
+ style.SetupLabel(separator_label_);
+ style.SetupLabel(time_status_label_);
+ }
}
void PowerStatusView::ChildPreferredSizeChanged(views::View* child) {
@@ -167,10 +165,6 @@ void PowerStatusView::Layout() {
}
}
-void PowerStatusView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
- UpdateStyle();
-}
-
void PowerStatusView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
if (!MaterialDesignController::IsSystemTrayMenuMaterial())
return;
« no previous file with comments | « ash/common/system/chromeos/power/power_status_view.h ('k') | ash/common/system/chromeos/screen_security/screen_tray_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698