| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/chromeos/power/suspend_observer.h" |
| 6 #include "chrome/browser/extensions/system/system_api.h" |
| 7 #include "chromeos/dbus/dbus_thread_manager.h" |
| 8 #include "chromeos/display/output_configurator.h" |
| 9 |
| 10 namespace chromeos { |
| 11 |
| 12 SuspendObserver::SuspendObserver() { |
| 13 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); |
| 14 } |
| 15 |
| 16 SuspendObserver::~SuspendObserver() { |
| 17 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); |
| 18 } |
| 19 |
| 20 void SuspendObserver::SuspendImminent() { |
| 21 ash::Shell::GetInstance()->output_configurator()->SuspendDisplays(); |
| 22 } |
| 23 |
| 24 } // namespace chromeos |
| OLD | NEW |