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_LOCK_WEBUI_SCREEN_LOCKER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WEBUI_SCREEN_LOCKER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WEBUI_SCREEN_LOCKER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WEBUI_SCREEN_LOCKER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
| 13 #include "ash/login/ui/lock_window.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
15 #include "base/time/time.h" | 16 #include "base/time/time.h" |
16 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 17 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
17 #include "chrome/browser/chromeos/login/signin_screen_controller.h" | 18 #include "chrome/browser/chromeos/login/signin_screen_controller.h" |
18 #include "chrome/browser/chromeos/login/signin_specifics.h" | 19 #include "chrome/browser/chromeos/login/signin_specifics.h" |
19 #include "chrome/browser/chromeos/login/ui/lock_window.h" | |
20 #include "chrome/browser/chromeos/login/ui/login_display.h" | 20 #include "chrome/browser/chromeos/login/ui/login_display.h" |
21 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 21 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
22 #include "chromeos/dbus/power_manager_client.h" | 22 #include "chromeos/dbus/power_manager_client.h" |
23 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
24 #include "ui/display/display_observer.h" | 24 #include "ui/display/display_observer.h" |
25 #include "ui/views/widget/widget.h" | 25 #include "ui/views/widget/widget.h" |
26 #include "ui/views/widget/widget_observer.h" | 26 #include "ui/views/widget/widget_observer.h" |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 class WebUI; | 29 class WebUI; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Reset user pod and ensures that user pod is focused. | 140 // Reset user pod and ensures that user pod is focused. |
141 void ResetAndFocusUserPod(); | 141 void ResetAndFocusUserPod(); |
142 | 142 |
143 // Configuration settings. | 143 // Configuration settings. |
144 WebViewSettings BuildConfigSettings(); | 144 WebViewSettings BuildConfigSettings(); |
145 | 145 |
146 // The ScreenLocker that owns this instance. | 146 // The ScreenLocker that owns this instance. |
147 ScreenLocker* screen_locker_ = nullptr; | 147 ScreenLocker* screen_locker_ = nullptr; |
148 | 148 |
149 // The screen locker window. | 149 // The screen locker window. |
150 LockWindow* lock_window_ = nullptr; | 150 ash::LockWindow* lock_window_ = nullptr; |
151 | 151 |
152 // Sign-in Screen controller instance (owns login screens). | 152 // Sign-in Screen controller instance (owns login screens). |
153 std::unique_ptr<SignInScreenController> signin_screen_controller_; | 153 std::unique_ptr<SignInScreenController> signin_screen_controller_; |
154 | 154 |
155 // Login UI implementation instance. | 155 // Login UI implementation instance. |
156 std::unique_ptr<WebUILoginDisplay> login_display_; | 156 std::unique_ptr<WebUILoginDisplay> login_display_; |
157 | 157 |
158 // Tracks when the lock window is displayed and ready. | 158 // Tracks when the lock window is displayed and ready. |
159 bool lock_ready_ = false; | 159 bool lock_ready_ = false; |
160 | 160 |
161 // Tracks when the WebUI finishes loading. | 161 // Tracks when the WebUI finishes loading. |
162 bool webui_ready_ = false; | 162 bool webui_ready_ = false; |
163 | 163 |
164 // Time when lock was initiated, required for metrics. | 164 // Time when lock was initiated, required for metrics. |
165 base::TimeTicks lock_time_; | 165 base::TimeTicks lock_time_; |
166 | 166 |
167 std::unique_ptr<login::NetworkStateHelper> network_state_helper_; | 167 std::unique_ptr<login::NetworkStateHelper> network_state_helper_; |
168 | 168 |
169 base::WeakPtrFactory<WebUIScreenLocker> weak_factory_; | 169 base::WeakPtrFactory<WebUIScreenLocker> weak_factory_; |
170 | 170 |
171 DISALLOW_COPY_AND_ASSIGN(WebUIScreenLocker); | 171 DISALLOW_COPY_AND_ASSIGN(WebUIScreenLocker); |
172 }; | 172 }; |
173 | 173 |
174 } // namespace chromeos | 174 } // namespace chromeos |
175 | 175 |
176 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WEBUI_SCREEN_LOCKER_H_ | 176 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WEBUI_SCREEN_LOCKER_H_ |
OLD | NEW |