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

Side by Side Diff: chrome/browser/chromeos/extensions/extension_system_event_observer.cc

Issue 240343004: chromeos: Update IdleActionImminent and SuspendDone handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/extension_system_event_observer.h" 5 #include "chrome/browser/chromeos/extensions/extension_system_event_observer.h"
6 6
7 #include "chrome/browser/extensions/api/system_private/system_private_api.h" 7 #include "chrome/browser/extensions/api/system_private/system_private_api.h"
8 #include "chromeos/dbus/dbus_thread_manager.h" 8 #include "chromeos/dbus/dbus_thread_manager.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
11 11
12 ExtensionSystemEventObserver::ExtensionSystemEventObserver() { 12 ExtensionSystemEventObserver::ExtensionSystemEventObserver() {
13 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); 13 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this);
14 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this); 14 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
15 } 15 }
16 16
17 ExtensionSystemEventObserver::~ExtensionSystemEventObserver() { 17 ExtensionSystemEventObserver::~ExtensionSystemEventObserver() {
18 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); 18 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this);
19 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); 19 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
20 } 20 }
21 21
22 void ExtensionSystemEventObserver::BrightnessChanged(int level, 22 void ExtensionSystemEventObserver::BrightnessChanged(int level,
23 bool user_initiated) { 23 bool user_initiated) {
24 extensions::DispatchBrightnessChangedEvent(level, user_initiated); 24 extensions::DispatchBrightnessChangedEvent(level, user_initiated);
25 } 25 }
26 26
27 void ExtensionSystemEventObserver::SystemResumed( 27 void ExtensionSystemEventObserver::SuspendDone(
28 const base::TimeDelta& sleep_duration) { 28 const base::TimeDelta& sleep_duration) {
29 extensions::DispatchWokeUpEvent(); 29 extensions::DispatchWokeUpEvent();
30 } 30 }
31 31
32 void ExtensionSystemEventObserver::ScreenIsUnlocked() { 32 void ExtensionSystemEventObserver::ScreenIsUnlocked() {
33 extensions::DispatchScreenUnlockedEvent(); 33 extensions::DispatchScreenUnlockedEvent();
34 } 34 }
35 35
36 } // namespace chromeos 36 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698