Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium OS 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 | |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame] | 5 | #ifndef CROS_DISKS_SESSION_MANAGER_OBSERVER_INTERFACE_H_ |
| 6 | #define CROS_DISKS_SESSION_MANAGER_OBSERVER_INTERFACE_H_ |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 7 | |
hscham | 9d83534 | 2020-04-16 15:23:37 +0900 | [diff] [blame] | 8 | #include "base/observer_list_types.h" |
| 9 | |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 10 | namespace cros_disks { |
| 11 | |
| 12 | // An interface class for observing events from the session manager. |
| 13 | // A derived class of this class should override the event methods |
| 14 | // that it would like to observe. |
hscham | 9d83534 | 2020-04-16 15:23:37 +0900 | [diff] [blame] | 15 | class SessionManagerObserverInterface : public base::CheckedObserver { |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 16 | public: |
Ben Chan | 40ecb9b | 2017-03-08 11:26:07 -0800 | [diff] [blame] | 17 | virtual ~SessionManagerObserverInterface() = default; |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 18 | |
Ben Chan | 5988f29 | 2012-09-18 08:32:42 -0700 | [diff] [blame] | 19 | // This method is called when the screen is locked. |
| 20 | virtual void OnScreenIsLocked() = 0; |
| 21 | |
| 22 | // This method is called when the screen is unlocked. |
| 23 | virtual void OnScreenIsUnlocked() = 0; |
| 24 | |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 25 | // This method is called when a session has started. |
Ben Chan | b3bf8d1 | 2013-04-23 13:57:55 -0700 | [diff] [blame] | 26 | virtual void OnSessionStarted() = 0; |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 27 | |
| 28 | // This method is called when a session has stopped. |
Ben Chan | b3bf8d1 | 2013-04-23 13:57:55 -0700 | [diff] [blame] | 29 | virtual void OnSessionStopped() = 0; |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | } // namespace cros_disks |
| 33 | |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame] | 34 | #endif // CROS_DISKS_SESSION_MANAGER_OBSERVER_INTERFACE_H_ |