Changes for start_with_ext Telemetry test to work on Windows.
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / extension_system_event_observer.h
blob1deb013b4c93c053f81b9ceb9f34b4918249084d
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_SYSTEM_EVENT_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_SYSTEM_EVENT_OBSERVER_H_
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"
13 namespace chromeos {
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 ~ExtensionSystemEventObserver() override;
23 // PowerManagerClient::Observer overrides:
24 void BrightnessChanged(int level, bool user_initiated) override;
25 void SuspendDone(const base::TimeDelta& sleep_duration) override;
27 // SessionManagerClient::Observer override.
28 void ScreenIsUnlocked() override;
30 private:
31 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemEventObserver);
34 } // namespace chromeos
36 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_SYSTEM_EVENT_OBSERVER_H_