| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBUI_SCREEN_LOCKER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_SCREEN_LOCKER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_SCREEN_LOCKER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_SCREEN_LOCKER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/wm/session_state_observer.h" | 10 #include "ash/wm/session_lock_state_observer.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "chrome/browser/chromeos/login/lock_window.h" | 15 #include "chrome/browser/chromeos/login/lock_window.h" |
| 16 #include "chrome/browser/chromeos/login/login_display.h" | 16 #include "chrome/browser/chromeos/login/login_display.h" |
| 17 #include "chrome/browser/chromeos/login/screen_locker_delegate.h" | 17 #include "chrome/browser/chromeos/login/screen_locker_delegate.h" |
| 18 #include "chrome/browser/chromeos/login/webui_login_view.h" | 18 #include "chrome/browser/chromeos/login/webui_login_view.h" |
| 19 #include "chromeos/dbus/power_manager_client.h" | 19 #include "chromeos/dbus/power_manager_client.h" |
| 20 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 36 namespace test { | 36 namespace test { |
| 37 class WebUIScreenLockerTester; | 37 class WebUIScreenLockerTester; |
| 38 } | 38 } |
| 39 | 39 |
| 40 // This version of ScreenLockerDelegate displays a WebUI lock screen based on | 40 // This version of ScreenLockerDelegate displays a WebUI lock screen based on |
| 41 // the Oobe account picker screen. | 41 // the Oobe account picker screen. |
| 42 class WebUIScreenLocker : public WebUILoginView, | 42 class WebUIScreenLocker : public WebUILoginView, |
| 43 public LoginDisplay::Delegate, | 43 public LoginDisplay::Delegate, |
| 44 public ScreenLockerDelegate, | 44 public ScreenLockerDelegate, |
| 45 public LockWindow::Observer, | 45 public LockWindow::Observer, |
| 46 public ash::SessionStateObserver, | 46 public ash::SessionLockStateObserver, |
| 47 public views::WidgetObserver, | 47 public views::WidgetObserver, |
| 48 public PowerManagerClient::Observer, | 48 public PowerManagerClient::Observer, |
| 49 public content::WebContentsObserver { | 49 public content::WebContentsObserver { |
| 50 public: | 50 public: |
| 51 explicit WebUIScreenLocker(ScreenLocker* screen_locker); | 51 explicit WebUIScreenLocker(ScreenLocker* screen_locker); |
| 52 | 52 |
| 53 // ScreenLockerDelegate implementation. | 53 // ScreenLockerDelegate implementation. |
| 54 virtual void LockScreen(bool unlock_on_input) OVERRIDE; | 54 virtual void LockScreen(bool unlock_on_input) OVERRIDE; |
| 55 virtual void ScreenLockReady() OVERRIDE; | 55 virtual void ScreenLockReady() OVERRIDE; |
| 56 virtual void OnAuthenticate() OVERRIDE; | 56 virtual void OnAuthenticate() OVERRIDE; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 85 virtual void Signout() OVERRIDE; | 85 virtual void Signout() OVERRIDE; |
| 86 | 86 |
| 87 // content::NotificationObserver (via WebUILoginView) implementation. | 87 // content::NotificationObserver (via WebUILoginView) implementation. |
| 88 virtual void Observe(int type, | 88 virtual void Observe(int type, |
| 89 const content::NotificationSource& source, | 89 const content::NotificationSource& source, |
| 90 const content::NotificationDetails& details) OVERRIDE; | 90 const content::NotificationDetails& details) OVERRIDE; |
| 91 | 91 |
| 92 // LockWindow::Observer implementation. | 92 // LockWindow::Observer implementation. |
| 93 virtual void OnLockWindowReady() OVERRIDE; | 93 virtual void OnLockWindowReady() OVERRIDE; |
| 94 | 94 |
| 95 // SessionStateObserver override. | 95 // SessionLockStateObserver override. |
| 96 virtual void OnSessionStateEvent(ash::SessionStateObserver::EventType event) | 96 virtual void OnSessionLockStateEvent( |
| 97 OVERRIDE; | 97 ash::SessionLockStateObserver::EventType event) OVERRIDE; |
| 98 | 98 |
| 99 // WidgetObserver override. | 99 // WidgetObserver override. |
| 100 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; | 100 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; |
| 101 | 101 |
| 102 // PowerManagerClient::Observer overrides: | 102 // PowerManagerClient::Observer overrides: |
| 103 virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE; | 103 virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE; |
| 104 virtual void LidEventReceived(bool open, | 104 virtual void LidEventReceived(bool open, |
| 105 const base::TimeTicks& time) OVERRIDE; | 105 const base::TimeTicks& time) OVERRIDE; |
| 106 | 106 |
| 107 // Overridden from content::WebContentsObserver: | 107 // Overridden from content::WebContentsObserver: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 134 base::TimeTicks lock_time_; | 134 base::TimeTicks lock_time_; |
| 135 | 135 |
| 136 base::WeakPtrFactory<WebUIScreenLocker> weak_factory_; | 136 base::WeakPtrFactory<WebUIScreenLocker> weak_factory_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(WebUIScreenLocker); | 138 DISALLOW_COPY_AND_ASSIGN(WebUIScreenLocker); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 } // namespace chromeos | 141 } // namespace chromeos |
| 142 | 142 |
| 143 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_SCREEN_LOCKER_H_ | 143 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_SCREEN_LOCKER_H_ |
| OLD | NEW |