| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_CHROME_SESSION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_CHROME_SESSION_MANAGER_H_ | 
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_CHROME_SESSION_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_CHROME_SESSION_MANAGER_H_ | 
| 7 | 7 | 
| 8 #include "base/macros.h" | 8 #include "base/macros.h" | 
| 9 #include "components/session_manager/core/session_manager.h" | 9 #include "components/session_manager/core/session_manager.h" | 
| 10 | 10 | 
| 11 namespace base { | 11 namespace base { | 
| 12 class CommandLine; | 12 class CommandLine; | 
| 13 } | 13 } | 
| 14 | 14 | 
| 15 class Profile; | 15 class Profile; | 
| 16 | 16 | 
| 17 namespace chromeos { | 17 namespace chromeos { | 
| 18 | 18 | 
| 19 class IdleDetector; |  | 
| 20 |  | 
| 21 class ChromeSessionManager : public session_manager::SessionManager { | 19 class ChromeSessionManager : public session_manager::SessionManager { | 
| 22  public: | 20  public: | 
| 23   ChromeSessionManager(); | 21   ChromeSessionManager(); | 
| 24   ~ChromeSessionManager() override; | 22   ~ChromeSessionManager() override; | 
| 25 | 23 | 
| 26   // Initialize session manager on browser starts up. Runs different code | 24   // Initialize session manager on browser starts up. Runs different code | 
| 27   // path based on command line flags and policy. Possible scenarios include: | 25   // path based on command line flags and policy. Possible scenarios include: | 
| 28   //   - Launches pre-session UI such as  out-of-box or login; | 26   //   - Launches pre-session UI such as  out-of-box or login; | 
| 29   //   - Launches the auto launched kiosk app; | 27   //   - Launches the auto launched kiosk app; | 
| 30   //   - Resumes user sessions on crash-and-restart; | 28   //   - Resumes user sessions on crash-and-restart; | 
| 31   //   - Starts a stub login session for dev or test; | 29   //   - Starts a stub login session for dev or test; | 
| 32   void Initialize(const base::CommandLine& parsed_command_line, | 30   void Initialize(const base::CommandLine& parsed_command_line, | 
| 33                   Profile* profile, | 31                   Profile* profile, | 
| 34                   bool is_running_test); | 32                   bool is_running_test); | 
| 35 | 33 | 
| 36   // session_manager::SessionManager: | 34   // session_manager::SessionManager: | 
| 37   void SessionStarted() override; | 35   void SessionStarted() override; | 
| 38   void NotifyUserLoggedIn(const AccountId& user_account_id, | 36   void NotifyUserLoggedIn(const AccountId& user_account_id, | 
| 39                           const std::string& user_id_hash, | 37                           const std::string& user_id_hash, | 
| 40                           bool browser_restart) override; | 38                           bool browser_restart) override; | 
| 41 | 39 | 
| 42  private: | 40  private: | 
| 43   // Used to preload the lock screen when the user is inactive. |  | 
| 44   std::unique_ptr<IdleDetector> idle_detector_; |  | 
| 45 |  | 
| 46   DISALLOW_COPY_AND_ASSIGN(ChromeSessionManager); | 41   DISALLOW_COPY_AND_ASSIGN(ChromeSessionManager); | 
| 47 }; | 42 }; | 
| 48 | 43 | 
| 49 }  // namespace chromeos | 44 }  // namespace chromeos | 
| 50 | 45 | 
| 51 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_CHROME_SESSION_MANAGER_H_ | 46 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_CHROME_SESSION_MANAGER_H_ | 
| OLD | NEW | 
|---|