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

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 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
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 42666496ef8770a2b5c9f059fe9c1d75a6ced018..1c8a6c2a88d20dc2c746ccc40bf82c4ee4e6f731 100644
--- a/ash/common/system/update/tray_update.cc
+++ b/ash/common/system/update/tray_update.cc
@@ -80,7 +80,8 @@ SkColor IconColorForUpdateSeverity(UpdateInfo::UpdateSeverity severity,
class UpdateView : public ActionableView {
public:
- explicit UpdateView(const UpdateInfo& info) {
+ explicit UpdateView(SystemTrayItem* owner, const UpdateInfo& info)
James Cook 2016/09/22 21:17:17 no explicit
oshima 2016/09/23 09:37:20 Done.
+ : ActionableView(owner) {
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
kTrayPopupPaddingHorizontal, 0,
kTrayPopupPaddingBetweenItems));
@@ -115,6 +116,7 @@ class UpdateView : public ActionableView {
WmShell::Get()->system_tray_delegate()->RequestRestartForUpdate();
WmShell::Get()->RecordUserMetricsAction(
UMA_STATUS_AREA_OS_UPDATE_DEFAULT_SELECTED);
+ CloseSystemBubble();
return true;
}
@@ -141,7 +143,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) {

Powered by Google App Engine
This is Rietveld 408576698