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

Side by Side Diff: chrome/browser/chromeos/power/suspend_observer.cc

Issue 11624038: [In progress] Monitor suspend code (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Created 8 years 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/power/suspend_observer.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/power/screen_dimming_observer.h" 5 #include "chrome/browser/chromeos/power/suspend_observer.h"
6 6 #include "chrome/browser/extensions/system/system_api.h"
7 #include "ash/shell.h"
8 #include "chromeos/dbus/dbus_thread_manager.h" 7 #include "chromeos/dbus/dbus_thread_manager.h"
8 #include "chromeos/display/output_configurator.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
11 11
12 ScreenDimmingObserver::ScreenDimmingObserver() { 12 SuspendObserver::SuspendObserver() {
13 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); 13 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this);
14 } 14 }
15 15
16 ScreenDimmingObserver::~ScreenDimmingObserver() { 16 SuspendObserver::~SuspendObserver() {
17 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); 17 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this);
18 } 18 }
19 19
20 void ScreenDimmingObserver::ScreenDimmingRequested(ScreenDimmingState state) { 20 void SuspendObserver::SuspendImminent() {
21 ash::Shell::GetInstance()->SetDimming( 21 ash::Shell::GetInstance()->output_configurator()->SuspendDisplays();
22 state == PowerManagerClient::Observer::SCREEN_DIMMING_IDLE);
23 } 22 }
24 23
25 } // namespace chromeos 24 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/power/suspend_observer.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698