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

Unified Diff: ash/system/chromeos/settings/tray_settings.cc

Issue 2058173002: mash: Move SystemTrayDelegate ownership to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback Created 4 years, 6 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/system/chromeos/settings/tray_settings.cc
diff --git a/ash/system/chromeos/settings/tray_settings.cc b/ash/system/chromeos/settings/tray_settings.cc
index a0ca04d602b09c2d65bcb9c7783d2d263c02e685..ecc20bcc038766794073cf4898b0f45bbcaf2c2b 100644
--- a/ash/system/chromeos/settings/tray_settings.cc
+++ b/ash/system/chromeos/settings/tray_settings.cc
@@ -8,6 +8,7 @@
#include "ash/common/system/tray/fixed_sized_image_view.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
+#include "ash/common/wm_shell.h"
#include "ash/shell.h"
#include "ash/system/chromeos/power/power_status.h"
#include "ash/system/chromeos/power/power_status_view.h"
@@ -72,15 +73,16 @@ class SettingsDefaultView : public ActionableView,
// Overridden from ash::ActionableView.
bool PerformAction(const ui::Event& event) override {
- bool userAddingRunning = ash::Shell::GetInstance()
- ->session_state_delegate()
- ->IsInSecondaryLoginScreen();
+ bool adding_user = Shell::GetInstance()
+ ->session_state_delegate()
+ ->IsInSecondaryLoginScreen();
if (login_status_ == LoginStatus::NOT_LOGGED_IN ||
- login_status_ == LoginStatus::LOCKED || userAddingRunning)
+ login_status_ == LoginStatus::LOCKED || adding_user) {
return false;
+ }
- ash::Shell::GetInstance()->system_tray_delegate()->ShowSettings();
+ WmShell::Get()->system_tray_delegate()->ShowSettings();
return true;
}
@@ -143,7 +145,7 @@ views::View* TraySettings::CreateDefaultView(LoginStatus status) {
if ((status == LoginStatus::NOT_LOGGED_IN || status == LoginStatus::LOCKED) &&
!PowerStatus::Get()->IsBatteryPresent())
return NULL;
- if (!ash::Shell::GetInstance()->system_tray_delegate()->ShouldShowSettings())
+ if (!WmShell::Get()->system_tray_delegate()->ShouldShowSettings())
return NULL;
CHECK(default_view_ == NULL);
default_view_ = new tray::SettingsDefaultView(status);

Powered by Google App Engine
This is Rietveld 408576698