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

Unified Diff: ash/common/system/chromeos/settings/tray_settings.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/chromeos/settings/tray_settings.cc
diff --git a/ash/common/system/chromeos/settings/tray_settings.cc b/ash/common/system/chromeos/settings/tray_settings.cc
index 1c495b3eee8011b620e76cf00a526e2a84fb9169..2e4dd0a91ad7898aaa5e93c1e173faefa9dbd6cc 100644
--- a/ash/common/system/chromeos/settings/tray_settings.cc
+++ b/ash/common/system/chromeos/settings/tray_settings.cc
@@ -34,8 +34,11 @@ namespace tray {
class SettingsDefaultView : public ActionableView,
public PowerStatus::Observer {
public:
- explicit SettingsDefaultView(LoginStatus status)
- : login_status_(status), label_(NULL), power_status_view_(NULL) {
+ explicit SettingsDefaultView(SystemTrayItem* owner, LoginStatus status)
James Cook 2016/09/22 21:17:16 nit: no explicit
oshima 2016/09/23 09:37:19 Done.
+ : ActionableView(owner),
+ login_status_(status),
+ label_(NULL),
James Cook 2016/09/22 21:17:16 nit: nullptr if you're touching the line
oshima 2016/09/23 09:37:19 Done.
+ power_status_view_(NULL) {
PowerStatus::Get()->AddObserver(this);
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
ash::kTrayPopupPaddingHorizontal, 0,
@@ -86,6 +89,7 @@ class SettingsDefaultView : public ActionableView,
}
WmShell::Get()->system_tray_delegate()->ShowSettings();
+ CloseSystemBubble();
return true;
}
@@ -149,7 +153,7 @@ views::View* TraySettings::CreateDefaultView(LoginStatus status) {
if (!WmShell::Get()->system_tray_delegate()->ShouldShowSettings())
return NULL;
CHECK(default_view_ == NULL);
- default_view_ = new tray::SettingsDefaultView(status);
+ default_view_ = new tray::SettingsDefaultView(this, status);
return default_view_;
}

Powered by Google App Engine
This is Rietveld 408576698