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

Unified Diff: ash/system/power/power_event_observer.cc

Issue 2815043002: Removes ShellPort::IsRunningInMash() (Closed)
Patch Set: dont set instance_ in constructor Created 3 years, 8 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/system/overview/overview_button_tray_unittest.cc ('k') | ash/system/toast/toast_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/power/power_event_observer.cc
diff --git a/ash/system/power/power_event_observer.cc b/ash/system/power/power_event_observer.cc
index adce7d3a06e2b1ec2ce995bb4459e0e2a688fc1e..9a773a66f1e3867c4a58762f214e88de05d753d9 100644
--- a/ash/system/power/power_event_observer.cc
+++ b/ash/system/power/power_event_observer.cc
@@ -4,6 +4,7 @@
#include "ash/system/power/power_event_observer.h"
+#include "ash/public/cpp/config.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
#include "ash/shell_port.h"
@@ -121,7 +122,7 @@ void PowerEventObserver::SuspendImminent() {
// TODO(derat): After mus exposes a method for suspending displays, call it
// here: http://crbug.com/692193
- if (!ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() != Config::MASH) {
Shell::Get()->display_configurator()->SuspendDisplays(base::Bind(
&OnSuspendDisplaysCompleted, chromeos::DBusThreadManager::Get()
->GetPowerManagerClient()
@@ -132,7 +133,7 @@ void PowerEventObserver::SuspendImminent() {
void PowerEventObserver::SuspendDone(const base::TimeDelta& sleep_duration) {
// TODO(derat): After mus exposes a method for resuming displays, call it
// here: http://crbug.com/692193
- if (!ShellPort::Get()->IsRunningInMash())
+ if (Shell::GetAshConfig() != Config::MASH)
Shell::Get()->display_configurator()->ResumeDisplays();
Shell::Get()->system_tray_notifier()->NotifyRefreshClock();
« no previous file with comments | « ash/system/overview/overview_button_tray_unittest.cc ('k') | ash/system/toast/toast_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698