| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/system/update/tray_update.h" | 5 #include "ash/common/system/update/tray_update.h" |
| 6 | 6 |
| 7 #include "ash/common/metrics/user_metrics_action.h" | 7 #include "ash/common/metrics/user_metrics_action.h" |
| 8 #include "ash/common/strings/grit/ash_strings.h" | 8 #include "ash/common/strings/grit/ash_strings.h" |
| 9 #include "ash/common/system/tray/fixed_sized_image_view.h" | 9 #include "ash/common/system/tray/fixed_sized_image_view.h" |
| 10 #include "ash/common/system/tray/system_tray.h" | 10 #include "ash/common/system/tray/system_tray.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 kSystemMenuUpdateIcon, | 75 kSystemMenuUpdateIcon, |
| 76 IconColorForUpdateSeverity(owner->severity_, true))); | 76 IconColorForUpdateSeverity(owner->severity_, true))); |
| 77 tri_view->AddView(TriView::Container::START, image); | 77 tri_view->AddView(TriView::Container::START, image); |
| 78 | 78 |
| 79 base::string16 label_text = | 79 base::string16 label_text = |
| 80 owner->factory_reset_required_ | 80 owner->factory_reset_required_ |
| 81 ? bundle.GetLocalizedString( | 81 ? bundle.GetLocalizedString( |
| 82 IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_TO_UPDATE) | 82 IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_TO_UPDATE) |
| 83 : bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE); | 83 : bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE); |
| 84 SetAccessibleName(label_text); | 84 SetAccessibleName(label_text); |
| 85 auto label = TrayPopupUtils::CreateDefaultLabel(); | 85 auto* label = TrayPopupUtils::CreateDefaultLabel(); |
| 86 label->SetText(label_text); | 86 label->SetText(label_text); |
| 87 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL); | 87 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL); |
| 88 style.SetupLabel(label); | 88 style.SetupLabel(label); |
| 89 tri_view->AddView(TriView::Container::CENTER, label); | 89 tri_view->AddView(TriView::Container::CENTER, label); |
| 90 | 90 |
| 91 SetInkDropMode(InkDropHostView::InkDropMode::ON); | 91 SetInkDropMode(InkDropHostView::InkDropMode::ON); |
| 92 } | 92 } |
| 93 | 93 |
| 94 ~UpdateView() override {} | 94 ~UpdateView() override {} |
| 95 | 95 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 update_required_ = true; | 127 update_required_ = true; |
| 128 severity_ = severity; | 128 severity_ = severity; |
| 129 factory_reset_required_ = factory_reset_required; | 129 factory_reset_required_ = factory_reset_required; |
| 130 | 130 |
| 131 // Show the icon in the tray. | 131 // Show the icon in the tray. |
| 132 SetIconColor(IconColorForUpdateSeverity(severity_, false)); | 132 SetIconColor(IconColorForUpdateSeverity(severity_, false)); |
| 133 tray_view()->SetVisible(true); | 133 tray_view()->SetVisible(true); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace ash | 136 } // namespace ash |
| OLD | NEW |