Chromium Code Reviews| 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_; |
| } |