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

Unified Diff: ash/common/system/update/tray_update.cc

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble by default Created 4 years, 3 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_accessibility.cc ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/update/tray_update.cc
diff --git a/ash/common/system/update/tray_update.cc b/ash/common/system/update/tray_update.cc
index 50362b660c099232b598863dad23eff016fb7766..f24da1468077d3ad2143732a3cc085a726682881 100644
--- a/ash/common/system/update/tray_update.cc
+++ b/ash/common/system/update/tray_update.cc
@@ -81,7 +81,8 @@ SkColor IconColorForUpdateSeverity(UpdateInfo::UpdateSeverity severity,
class UpdateView : public ActionableView {
public:
- explicit UpdateView(const UpdateInfo& info) : label_(nullptr) {
+ UpdateView(SystemTrayItem* owner, const UpdateInfo& info)
+ : ActionableView(owner), label_(nullptr) {
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
kTrayPopupPaddingHorizontal, 0,
kTrayPopupPaddingBetweenItems));
@@ -117,6 +118,7 @@ class UpdateView : public ActionableView {
WmShell::Get()->system_tray_delegate()->RequestRestartForUpdate();
WmShell::Get()->RecordUserMetricsAction(
UMA_STATUS_AREA_OS_UPDATE_DEFAULT_SELECTED);
+ CloseSystemBubble();
return true;
}
@@ -156,7 +158,7 @@ bool TrayUpdate::GetInitialVisibility() {
views::View* TrayUpdate::CreateDefaultView(LoginStatus status) {
UpdateInfo info;
WmShell::Get()->system_tray_delegate()->GetSystemUpdateInfo(&info);
- return info.update_required ? new UpdateView(info) : nullptr;
+ return info.update_required ? new UpdateView(this, info) : nullptr;
}
void TrayUpdate::OnUpdateRecommended(const UpdateInfo& info) {
« no previous file with comments | « ash/common/system/tray_accessibility.cc ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698