| 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_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 // Demo app launcher. | 217 // Demo app launcher. |
| 218 std::unique_ptr<DemoAppLauncher> demo_app_launcher_; | 218 std::unique_ptr<DemoAppLauncher> demo_app_launcher_; |
| 219 | 219 |
| 220 // Make sure chrome won't exit while we are at login/oobe screen. | 220 // Make sure chrome won't exit while we are at login/oobe screen. |
| 221 std::unique_ptr<ScopedKeepAlive> keep_alive_; | 221 std::unique_ptr<ScopedKeepAlive> keep_alive_; |
| 222 | 222 |
| 223 // Has ShutdownDisplayHost() already been called? Used to avoid posting our | 223 // Has ShutdownDisplayHost() already been called? Used to avoid posting our |
| 224 // own deletion to the message loop twice if the user logs out while we're | 224 // own deletion to the message loop twice if the user logs out while we're |
| 225 // still in the process of cleaning up after login (http://crbug.com/134463). | 225 // still in the process of cleaning up after login (http://crbug.com/134463). |
| 226 bool shutting_down_; | 226 bool shutting_down_ = false; |
| 227 | 227 |
| 228 // Whether progress bar is shown on the OOBE page. | 228 // Whether progress bar is shown on the OOBE page. |
| 229 bool oobe_progress_bar_visible_; | 229 bool oobe_progress_bar_visible_ = false; |
| 230 | 230 |
| 231 // True if session start is in progress. | 231 // True if session start is in progress. |
| 232 bool session_starting_; | 232 bool session_starting_ = false; |
| 233 | 233 |
| 234 // Container of the screen we are displaying. | 234 // Container of the screen we are displaying. |
| 235 views::Widget* login_window_; | 235 views::Widget* login_window_ = nullptr; |
| 236 | 236 |
| 237 // Container of the view we are displaying. | 237 // Container of the view we are displaying. |
| 238 WebUILoginView* login_view_; | 238 WebUILoginView* login_view_ = nullptr; |
| 239 | 239 |
| 240 // Login display we are using. | 240 // Login display we are using. |
| 241 WebUILoginDisplay* webui_login_display_; | 241 WebUILoginDisplay* webui_login_display_ = nullptr; |
| 242 | 242 |
| 243 // True if the login display is the current screen. | 243 // True if the login display is the current screen. |
| 244 bool is_showing_login_; | 244 bool is_showing_login_ = false; |
| 245 | 245 |
| 246 // True if NOTIFICATION_WALLPAPER_ANIMATION_FINISHED notification has been | 246 // True if NOTIFICATION_WALLPAPER_ANIMATION_FINISHED notification has been |
| 247 // received. | 247 // received. |
| 248 bool is_wallpaper_loaded_; | 248 bool is_wallpaper_loaded_ = false; |
| 249 | 249 |
| 250 // Stores status area current visibility to be applied once login WebUI | 250 // Stores status area current visibility to be applied once login WebUI |
| 251 // is shown. | 251 // is shown. |
| 252 bool status_area_saved_visibility_; | 252 bool status_area_saved_visibility_ = false; |
| 253 | 253 |
| 254 // If true, WebUI is initialized in a hidden state and shown after the | 254 // If true, WebUI is initialized in a hidden state and shown after the |
| 255 // wallpaper animation is finished (when it is enabled) or the user pods have | 255 // wallpaper animation is finished (when it is enabled) or the user pods have |
| 256 // been loaded (otherwise). | 256 // been loaded (otherwise). |
| 257 // By default is true. Could be used to tune performance if needed. | 257 // By default is true. Could be used to tune performance if needed. |
| 258 bool initialize_webui_hidden_; | 258 bool initialize_webui_hidden_; |
| 259 | 259 |
| 260 // True if WebUI is initialized in hidden state and we're waiting for | 260 // True if WebUI is initialized in hidden state and we're waiting for |
| 261 // wallpaper load animation to finish. | 261 // wallpaper load animation to finish. |
| 262 bool waiting_for_wallpaper_load_; | 262 bool waiting_for_wallpaper_load_; |
| 263 | 263 |
| 264 // True if WebUI is initialized in hidden state and we're waiting for user | 264 // True if WebUI is initialized in hidden state and we're waiting for user |
| 265 // pods to load. | 265 // pods to load. |
| 266 bool waiting_for_user_pods_; | 266 bool waiting_for_user_pods_; |
| 267 | 267 |
| 268 // How many times renderer has crashed. | 268 // How many times renderer has crashed. |
| 269 int crash_count_; | 269 int crash_count_ = 0; |
| 270 | 270 |
| 271 // Way to restore if renderer have crashed. | 271 // Way to restore if renderer have crashed. |
| 272 RestorePath restore_path_; | 272 RestorePath restore_path_ = RESTORE_UNKNOWN; |
| 273 | 273 |
| 274 // Stored parameters for StartWizard, required to restore in case of crash. | 274 // Stored parameters for StartWizard, required to restore in case of crash. |
| 275 OobeScreen first_screen_; | 275 OobeScreen first_screen_; |
| 276 | 276 |
| 277 // Called before host deletion. | 277 // Called before host deletion. |
| 278 base::Closure completion_callback_; | 278 base::Closure completion_callback_; |
| 279 | 279 |
| 280 // Active instance of authentication prewarmer. | 280 // Active instance of authentication prewarmer. |
| 281 std::unique_ptr<AuthPrewarmer> auth_prewarmer_; | 281 std::unique_ptr<AuthPrewarmer> auth_prewarmer_; |
| 282 | 282 |
| 283 // A focus ring controller to draw focus ring around view for keyboard | 283 // A focus ring controller to draw focus ring around view for keyboard |
| 284 // driven oobe. | 284 // driven oobe. |
| 285 std::unique_ptr<FocusRingController> focus_ring_controller_; | 285 std::unique_ptr<FocusRingController> focus_ring_controller_; |
| 286 | 286 |
| 287 // Handles special keys for keyboard driven oobe. | 287 // Handles special keys for keyboard driven oobe. |
| 288 std::unique_ptr<KeyboardDrivenOobeKeyHandler> | 288 std::unique_ptr<KeyboardDrivenOobeKeyHandler> |
| 289 keyboard_driven_oobe_key_handler_; | 289 keyboard_driven_oobe_key_handler_; |
| 290 | 290 |
| 291 FinalizeAnimationType finalize_animation_type_; | 291 FinalizeAnimationType finalize_animation_type_ = ANIMATION_WORKSPACE; |
| 292 | 292 |
| 293 // Time when login prompt visible signal is received. Used for | 293 // Time when login prompt visible signal is received. Used for |
| 294 // calculations of delay before startup sound. | 294 // calculations of delay before startup sound. |
| 295 base::TimeTicks login_prompt_visible_time_; | 295 base::TimeTicks login_prompt_visible_time_; |
| 296 | 296 |
| 297 // True when request to play startup sound was sent to | 297 // True when request to play startup sound was sent to |
| 298 // SoundsManager. | 298 // SoundsManager. |
| 299 bool startup_sound_played_; | 299 bool startup_sound_played_ = false; |
| 300 | 300 |
| 301 // When true, startup sound should be played only when spoken | 301 // When true, startup sound should be played only when spoken |
| 302 // feedback is enabled. Otherwise, startup sound should be played | 302 // feedback is enabled. Otherwise, startup sound should be played |
| 303 // in any case. | 303 // in any case. |
| 304 bool startup_sound_honors_spoken_feedback_; | 304 bool startup_sound_honors_spoken_feedback_ = false; |
| 305 | 305 |
| 306 // True is subscribed as keyboard controller observer. | 306 // True is subscribed as keyboard controller observer. |
| 307 bool is_observing_keyboard_; | 307 bool is_observing_keyboard_ = false; |
| 308 | 308 |
| 309 // Keeps a copy of the old Drag'n'Drop client, so that it would be disabled | 309 // Keeps a copy of the old Drag'n'Drop client, so that it would be disabled |
| 310 // during a login session and restored afterwards. | 310 // during a login session and restored afterwards. |
| 311 std::unique_ptr<aura::client::ScopedDragDropDisabler> | 311 std::unique_ptr<aura::client::ScopedDragDropDisabler> |
| 312 scoped_drag_drop_disabler_; | 312 scoped_drag_drop_disabler_; |
| 313 | 313 |
| 314 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; | 314 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; |
| 315 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; | 315 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; |
| 316 | 316 |
| 317 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); | 317 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); |
| 318 }; | 318 }; |
| 319 | 319 |
| 320 } // namespace chromeos | 320 } // namespace chromeos |
| 321 | 321 |
| 322 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 322 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
| OLD | NEW |