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

Side by Side Diff: ash/common/system/update/tray_update.cc

Issue 2457393006: [ash-md] Added ink drop to system menu rows that inherit from ActionableView. (Closed)
Patch Set: Fixed the failing test: 'SpokenFeedbackTest.NavigateSystemTray' Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « ash/common/system/tray/tray_popup_utils.cc ('k') | ui/views/animation/ink_drop_highlight.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/metrics/user_metrics_action.h" 8 #include "ash/common/metrics/user_metrics_action.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 AddChildView(image); 101 AddChildView(image);
102 102
103 base::string16 label_text = 103 base::string16 label_text =
104 info.factory_reset_required 104 info.factory_reset_required
105 ? bundle.GetLocalizedString( 105 ? bundle.GetLocalizedString(
106 IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_TO_UPDATE) 106 IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_TO_UPDATE)
107 : bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE); 107 : bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE);
108 label_ = new views::Label(label_text); 108 label_ = new views::Label(label_text);
109 AddChildView(label_); 109 AddChildView(label_);
110 SetAccessibleName(label_text); 110 SetAccessibleName(label_text);
111
112 if (MaterialDesignController::IsSystemTrayMenuMaterial())
113 SetInkDropMode(InkDropHostView::InkDropMode::ON);
111 } 114 }
112 115
113 ~UpdateView() override {} 116 ~UpdateView() override {}
114 117
115 private: 118 private:
116 // Overridden from ActionableView. 119 // Overridden from ActionableView.
117 bool PerformAction(const ui::Event& event) override { 120 bool PerformAction(const ui::Event& event) override {
118 WmShell::Get()->system_tray_delegate()->RequestRestartForUpdate(); 121 WmShell::Get()->system_tray_delegate()->RequestRestartForUpdate();
119 WmShell::Get()->RecordUserMetricsAction( 122 WmShell::Get()->RecordUserMetricsAction(
120 UMA_STATUS_AREA_OS_UPDATE_DEFAULT_SELECTED); 123 UMA_STATUS_AREA_OS_UPDATE_DEFAULT_SELECTED);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 166
164 void TrayUpdate::OnUpdateRecommended(const UpdateInfo& info) { 167 void TrayUpdate::OnUpdateRecommended(const UpdateInfo& info) {
165 if (MaterialDesignController::UseMaterialDesignSystemIcons()) 168 if (MaterialDesignController::UseMaterialDesignSystemIcons())
166 SetIconColor(IconColorForUpdateSeverity(info.severity, false)); 169 SetIconColor(IconColorForUpdateSeverity(info.severity, false));
167 else 170 else
168 SetImageFromResourceId(DecideResource(info.severity, false)); 171 SetImageFromResourceId(DecideResource(info.severity, false));
169 tray_view()->SetVisible(true); 172 tray_view()->SetVisible(true);
170 } 173 }
171 174
172 } // namespace ash 175 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_popup_utils.cc ('k') | ui/views/animation/ink_drop_highlight.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698