| 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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_SYSTEM_EVENT_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_SYSTEM_EVENT_OBSERVER_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "chromeos/dbus/power_manager_client.h" |
| 11 #include "chromeos/dbus/session_manager_client.h" |
| 12 |
| 13 namespace chromeos { |
| 14 |
| 15 // Dispatches extension events in response to system events. |
| 16 class ExtensionSystemEventObserver : public PowerManagerClient::Observer, |
| 17 public SessionManagerClient::Observer { |
| 18 public: |
| 19 // This class registers/unregisters itself as an observer in ctor/dtor. |
| 20 ExtensionSystemEventObserver(); |
| 21 virtual ~ExtensionSystemEventObserver(); |
| 22 |
| 23 // PowerManagerClient::Observer overrides: |
| 24 virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE; |
| 25 virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE; |
| 26 |
| 27 // SessionManagerClient::Observer override. |
| 28 virtual void ScreenIsUnlocked() OVERRIDE; |
| 29 |
| 30 private: |
| 31 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemEventObserver); |
| 32 }; |
| 33 |
| 34 } // namespace chromeos |
| 35 |
| 36 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_SYSTEM_EVENT_OBSERVER_H_ |
| OLD | NEW |