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