Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: chrome/browser/chromeos/login/webui_login_display_host.h

Issue 10824203: Initialize OOBE/login WebUI in hidden state in parallel with wallpaper animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix how login prompt-visible is emitted Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/window_animations.cc ('k') | chrome/browser/chromeos/login/webui_login_display_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_LOGIN_DISPLAY_HOST_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const content::NotificationSource& source, 60 const content::NotificationSource& source,
61 const content::NotificationDetails& details) OVERRIDE; 61 const content::NotificationDetails& details) OVERRIDE;
62 62
63 private: 63 private:
64 // Overridden from content::WebContentsObserver: 64 // Overridden from content::WebContentsObserver:
65 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; 65 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
66 66
67 // Loads given URL. Creates WebUILoginView if needed. 67 // Loads given URL. Creates WebUILoginView if needed.
68 void LoadURL(const GURL& url); 68 void LoadURL(const GURL& url);
69 69
70 // Shows OOBE/sign in WebUI that was previously initialized in hidden state.
71 void ShowWebUI();
72
70 // Starts postponed WebUI (OOBE/sign in) if it was waiting for 73 // Starts postponed WebUI (OOBE/sign in) if it was waiting for
71 // wallpaper animation end. 74 // wallpaper animation end.
72 void StartPostponedWebUI(); 75 void StartPostponedWebUI();
73 76
74 // Container of the screen we are displaying. 77 // Container of the screen we are displaying.
75 views::Widget* login_window_; 78 views::Widget* login_window_;
76 79
77 // Container of the view we are displaying. 80 // Container of the view we are displaying.
78 WebUILoginView* login_view_; 81 WebUILoginView* login_view_;
79 82
80 // Login display we are using. 83 // Login display we are using.
81 WebUILoginDisplay* webui_login_display_; 84 WebUILoginDisplay* webui_login_display_;
82 85
83 // True if the login display is the current screen. 86 // True if the login display is the current screen.
84 bool is_showing_login_; 87 bool is_showing_login_;
85 88
86 // True if NOTIFICATION_WALLPAPER_ANIMATION_FINISHED notification has been 89 // True if NOTIFICATION_WALLPAPER_ANIMATION_FINISHED notification has been
87 // received. 90 // received.
88 bool is_wallpaper_loaded_; 91 bool is_wallpaper_loaded_;
89 92
93 // True if WebUI is initialized hidden in parallel with wallpaper animation.
94 // Otherwise it is postponed and only starts initializing when animation
95 // finishes. Makes sense only if |waiting_for_wallpaper_load_| is true.
96 // By default is true. Could be used to tune performance if needed.
97 bool initialize_webui_in_parallel_;
98
99 // Stores status area current visibility to be applied once login WebUI
100 // is shown.
101 bool status_area_saved_visibility_;
102
90 // True if should not show WebUI on first StartWizard/StartSignInScreen call 103 // True if should not show WebUI on first StartWizard/StartSignInScreen call
91 // but wait for wallpaper load animation to finish. 104 // but wait for wallpaper load animation to finish.
92 // Used in OOBE (first boot, boot after update) i.e. till 105 // OOBE/sign in WebUI is either initialized hidden or postponed i.e. loaded
93 // device is marked as registered to postpone loading OOBE screen / sign in. 106 // only when wallpaper animation finishes.
94 bool waiting_for_wallpaper_load_; 107 bool waiting_for_wallpaper_load_;
95 108
96 content::NotificationRegistrar registrar_; 109 content::NotificationRegistrar registrar_;
97 110
98 // How many times renderer has crashed. 111 // How many times renderer has crashed.
99 int crash_count_; 112 int crash_count_;
100 113
101 // Way to restore if renderer have crashed. 114 // Way to restore if renderer have crashed.
102 enum { 115 enum {
103 RESTORE_UNKNOWN, 116 RESTORE_UNKNOWN,
104 RESTORE_WIZARD, 117 RESTORE_WIZARD,
105 RESTORE_SIGN_IN 118 RESTORE_SIGN_IN
106 } restore_path_; 119 } restore_path_;
107 120
108 // Stored parameters for StartWizard, required to restore in case of crash. 121 // Stored parameters for StartWizard, required to restore in case of crash.
109 std::string wizard_first_screen_name_; 122 std::string wizard_first_screen_name_;
110 scoped_ptr<DictionaryValue> wizard_screen_parameters_; 123 scoped_ptr<DictionaryValue> wizard_screen_parameters_;
111 124
112 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplayHost); 125 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplayHost);
113 }; 126 };
114 127
115 } // namespace chromeos 128 } // namespace chromeos
116 129
117 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_ 130 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_
OLDNEW
« no previous file with comments | « ash/wm/window_animations.cc ('k') | chrome/browser/chromeos/login/webui_login_display_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698