| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // This version of ScreenLockerDelegate displays a WebUI lock screen based on | 31 // This version of ScreenLockerDelegate displays a WebUI lock screen based on |
| 32 // the Oobe account picker screen. | 32 // the Oobe account picker screen. |
| 33 class WebUIScreenLocker : public WebUILoginView, | 33 class WebUIScreenLocker : public WebUILoginView, |
| 34 public LoginDisplay::Delegate, | 34 public LoginDisplay::Delegate, |
| 35 public content::NotificationObserver, | 35 public content::NotificationObserver, |
| 36 public ScreenLockerDelegate { | 36 public ScreenLockerDelegate { |
| 37 public: | 37 public: |
| 38 explicit WebUIScreenLocker(ScreenLocker* screen_locker); | 38 explicit WebUIScreenLocker(ScreenLocker* screen_locker); |
| 39 | 39 |
| 40 // Called when the all inputs are grabbed. |
| 41 void OnGrabInputs(); |
| 42 |
| 40 // ScreenLockerDelegate implementation: | 43 // ScreenLockerDelegate implementation: |
| 41 virtual void LockScreen(bool unlock_on_input) OVERRIDE; | 44 virtual void LockScreen(bool unlock_on_input) OVERRIDE; |
| 42 virtual void ScreenLockReady() OVERRIDE; | 45 virtual void ScreenLockReady() OVERRIDE; |
| 43 virtual void OnAuthenticate() OVERRIDE; | 46 virtual void OnAuthenticate() OVERRIDE; |
| 44 virtual void SetInputEnabled(bool enabled) OVERRIDE; | 47 virtual void SetInputEnabled(bool enabled) OVERRIDE; |
| 45 virtual void SetSignoutEnabled(bool enabled) OVERRIDE; | 48 virtual void SetSignoutEnabled(bool enabled) OVERRIDE; |
| 46 virtual void ShowErrorMessage(const string16& message, | 49 virtual void ShowErrorMessage(const string16& message, |
| 47 bool sign_out_only) OVERRIDE; | 50 bool sign_out_only) OVERRIDE; |
| 48 virtual void ShowCaptchaAndErrorMessage(const GURL& captcha_url, | 51 virtual void ShowCaptchaAndErrorMessage(const GURL& captcha_url, |
| 49 const string16& message) OVERRIDE; | 52 const string16& message) OVERRIDE; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 62 virtual void OnStartEnterpriseEnrollment() OVERRIDE; | 65 virtual void OnStartEnterpriseEnrollment() OVERRIDE; |
| 63 | 66 |
| 64 // content::NotificationObserver implementation. | 67 // content::NotificationObserver implementation. |
| 65 virtual void Observe(int type, | 68 virtual void Observe(int type, |
| 66 const content::NotificationSource& source, | 69 const content::NotificationSource& source, |
| 67 const content::NotificationDetails& details); | 70 const content::NotificationDetails& details); |
| 68 | 71 |
| 69 private: | 72 private: |
| 70 virtual ~WebUIScreenLocker(); | 73 virtual ~WebUIScreenLocker(); |
| 71 | 74 |
| 75 // Called when the window manager is ready to handle locked state. |
| 76 void OnWindowManagerReady(); |
| 77 |
| 72 // Event handler for client-event. | 78 // Event handler for client-event. |
| 73 CHROMEGTK_CALLBACK_1(WebUIScreenLocker, void, OnClientEvent, GdkEventClient*) | 79 CHROMEGTK_CALLBACK_1(WebUIScreenLocker, void, OnClientEvent, GdkEventClient*) |
| 74 | 80 |
| 81 // The screen locker window. |
| 75 views::Widget* lock_window_; | 82 views::Widget* lock_window_; |
| 76 | 83 |
| 77 // Login UI implementation instance. | 84 // Login UI implementation instance. |
| 78 scoped_ptr<WebUILoginDisplay> login_display_; | 85 scoped_ptr<WebUILoginDisplay> login_display_; |
| 79 | 86 |
| 80 // Used for user image changed notifications. | 87 // Used for user image changed notifications. |
| 81 content::NotificationRegistrar registrar_; | 88 content::NotificationRegistrar registrar_; |
| 82 | 89 |
| 90 // True if the screen locker's window has been drawn. |
| 91 bool drawn_; |
| 92 |
| 93 // True if both mouse input and keyboard input are grabbed. |
| 94 bool input_grabbed_; |
| 95 |
| 83 DISALLOW_COPY_AND_ASSIGN(WebUIScreenLocker); | 96 DISALLOW_COPY_AND_ASSIGN(WebUIScreenLocker); |
| 84 }; | 97 }; |
| 85 | 98 |
| 86 } // namespace chromeos | 99 } // namespace chromeos |
| 87 | 100 |
| 88 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_SCREEN_LOCKER_H_ | 101 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_SCREEN_LOCKER_H_ |
| OLD | NEW |