| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_ | 6 #define CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "ash/session_state_delegate.h" | 8 #include "ash/session_state_delegate.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "chrome/browser/chromeos/login/user_manager.h" | 12 #include "chrome/browser/chromeos/login/user_manager.h" |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 class SessionStateObserver; | 15 class SessionStateObserver; |
| 16 } // namespace ash | 16 } // namespace ash |
| 17 | 17 |
| 18 class SessionStateDelegateChromeos | 18 class SessionStateDelegateChromeos |
| 19 : public ash::SessionStateDelegate, | 19 : public ash::SessionStateDelegate, |
| 20 public chromeos::UserManager::UserSessionStateObserver { | 20 public chromeos::UserManager::UserSessionStateObserver { |
| 21 public: | 21 public: |
| 22 SessionStateDelegateChromeos(); | 22 SessionStateDelegateChromeos(); |
| 23 virtual ~SessionStateDelegateChromeos(); | 23 virtual ~SessionStateDelegateChromeos(); |
| 24 | 24 |
| 25 // ash::SessionStateDelegate: | 25 // ash::SessionStateDelegate: |
| 26 virtual content::BrowserContext* GetBrowserContextByIndex( | 26 virtual content::BrowserContext* GetBrowserContextByIndex( |
| 27 ash::MultiProfileIndex index) OVERRIDE; | 27 ash::MultiProfileIndex index) OVERRIDE; |
| 28 virtual content::BrowserContext* GetBrowserContextForWindow( |
| 29 aura::Window* window) OVERRIDE; |
| 28 virtual int GetMaximumNumberOfLoggedInUsers() const OVERRIDE; | 30 virtual int GetMaximumNumberOfLoggedInUsers() const OVERRIDE; |
| 29 virtual int NumberOfLoggedInUsers() const OVERRIDE; | 31 virtual int NumberOfLoggedInUsers() const OVERRIDE; |
| 30 virtual bool IsActiveUserSessionStarted() const OVERRIDE; | 32 virtual bool IsActiveUserSessionStarted() const OVERRIDE; |
| 31 virtual bool CanLockScreen() const OVERRIDE; | 33 virtual bool CanLockScreen() const OVERRIDE; |
| 32 virtual bool IsScreenLocked() const OVERRIDE; | 34 virtual bool IsScreenLocked() const OVERRIDE; |
| 33 virtual bool ShouldLockScreenBeforeSuspending() const OVERRIDE; | 35 virtual bool ShouldLockScreenBeforeSuspending() const OVERRIDE; |
| 34 virtual void LockScreen() OVERRIDE; | 36 virtual void LockScreen() OVERRIDE; |
| 35 virtual void UnlockScreen() OVERRIDE; | 37 virtual void UnlockScreen() OVERRIDE; |
| 36 virtual bool IsUserSessionBlocked() const OVERRIDE; | 38 virtual bool IsUserSessionBlocked() const OVERRIDE; |
| 37 virtual const base::string16 GetUserDisplayName( | 39 virtual const base::string16 GetUserDisplayName( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 54 virtual void UserAddedToSession(const chromeos::User* added_user) OVERRIDE; | 56 virtual void UserAddedToSession(const chromeos::User* added_user) OVERRIDE; |
| 55 | 57 |
| 56 private: | 58 private: |
| 57 // List of observers is only used on Chrome OS for now. | 59 // List of observers is only used on Chrome OS for now. |
| 58 ObserverList<ash::SessionStateObserver> session_state_observer_list_; | 60 ObserverList<ash::SessionStateObserver> session_state_observer_list_; |
| 59 | 61 |
| 60 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateChromeos); | 62 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateChromeos); |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 #endif // CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_ | 65 #endif // CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_ |
| OLD | NEW |