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

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

Issue 14200033: [cros] Rename BaseLoginDisplayHost to LoginDisplayHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 8 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
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 #include "chrome/browser/chromeos/login/webui_login_display_host.h" 5 #include "chrome/browser/chromeos/login/webui_login_display_host.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/desktop_background/user_wallpaper_delegate.h" 8 #include "ash/desktop_background/user_wallpaper_delegate.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // Switch values that might be used to override WebUI init type. 55 // Switch values that might be used to override WebUI init type.
56 const char kWebUIInitParallel[] = "parallel"; 56 const char kWebUIInitParallel[] = "parallel";
57 const char kWebUIInitPostpone[] = "postpone"; 57 const char kWebUIInitPostpone[] = "postpone";
58 58
59 } // namespace 59 } // namespace
60 60
61 // WebUILoginDisplayHost ------------------------------------------------------- 61 // WebUILoginDisplayHost -------------------------------------------------------
62 62
63 WebUILoginDisplayHost::WebUILoginDisplayHost(const gfx::Rect& background_bounds) 63 WebUILoginDisplayHost::WebUILoginDisplayHost(const gfx::Rect& background_bounds)
64 : BaseLoginDisplayHost(background_bounds), 64 : LoginDisplayHostImpl(background_bounds),
65 login_window_(NULL), 65 login_window_(NULL),
66 login_view_(NULL), 66 login_view_(NULL),
67 webui_login_display_(NULL), 67 webui_login_display_(NULL),
68 is_showing_login_(false), 68 is_showing_login_(false),
69 is_wallpaper_loaded_(false), 69 is_wallpaper_loaded_(false),
70 status_area_saved_visibility_(false), 70 status_area_saved_visibility_(false),
71 crash_count_(0), 71 crash_count_(0),
72 restore_path_(RESTORE_UNKNOWN), 72 restore_path_(RESTORE_UNKNOWN),
73 old_ignore_solo_window_frame_painter_policy_value_(false) { 73 old_ignore_solo_window_frame_painter_policy_value_(false) {
74 bool is_registered = WizardController::IsDeviceRegistered(); 74 bool is_registered = WizardController::IsDeviceRegistered();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { 190 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) {
191 LOG(INFO) << "Login WebUI >> wizard postponed"; 191 LOG(INFO) << "Login WebUI >> wizard postponed";
192 return; 192 return;
193 } 193 }
194 LOG(INFO) << "Login WebUI >> wizard"; 194 LOG(INFO) << "Login WebUI >> wizard";
195 195
196 if (!login_window_) 196 if (!login_window_)
197 LoadURL(GURL(kOobeURL)); 197 LoadURL(GURL(kOobeURL));
198 198
199 BaseLoginDisplayHost::StartWizard(first_screen_name, 199 LoginDisplayHostImpl::StartWizard(first_screen_name,
200 scoped_parameters.release()); 200 scoped_parameters.release());
201 } 201 }
202 202
203 void WebUILoginDisplayHost::StartSignInScreen() { 203 void WebUILoginDisplayHost::StartSignInScreen() {
204 restore_path_ = RESTORE_SIGN_IN; 204 restore_path_ = RESTORE_SIGN_IN;
205 is_showing_login_ = true; 205 is_showing_login_ = true;
206 206
207 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { 207 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) {
208 LOG(INFO) << "Login WebUI >> sign in postponed"; 208 LOG(INFO) << "Login WebUI >> sign in postponed";
209 return; 209 return;
210 } 210 }
211 LOG(INFO) << "Login WebUI >> sign in"; 211 LOG(INFO) << "Login WebUI >> sign in";
212 212
213 if (!login_window_) 213 if (!login_window_)
214 LoadURL(GURL(kLoginURL)); 214 LoadURL(GURL(kLoginURL));
215 215
216 BaseLoginDisplayHost::StartSignInScreen(); 216 LoginDisplayHostImpl::StartSignInScreen();
217 CHECK(webui_login_display_); 217 CHECK(webui_login_display_);
218 GetOobeUI()->ShowSigninScreen(webui_login_display_, webui_login_display_); 218 GetOobeUI()->ShowSigninScreen(webui_login_display_, webui_login_display_);
219 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) 219 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled())
220 SetStatusAreaVisible(false); 220 SetStatusAreaVisible(false);
221 } 221 }
222 222
223 void WebUILoginDisplayHost::OnPreferencesChanged() { 223 void WebUILoginDisplayHost::OnPreferencesChanged() {
224 if (is_showing_login_) 224 if (is_showing_login_)
225 webui_login_display_->OnPreferencesChanged(); 225 webui_login_display_->OnPreferencesChanged();
226 } 226 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 ShowWebUI(); 259 ShowWebUI();
260 } else if (waiting_for_wallpaper_load_ && initialize_webui_hidden_) { 260 } else if (waiting_for_wallpaper_load_ && initialize_webui_hidden_) {
261 // Reduce time till login UI is shown - show it as soon as possible. 261 // Reduce time till login UI is shown - show it as soon as possible.
262 waiting_for_wallpaper_load_ = false; 262 waiting_for_wallpaper_load_ = false;
263 ShowWebUI(); 263 ShowWebUI();
264 } 264 }
265 registrar_.Remove(this, 265 registrar_.Remove(this,
266 chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE, 266 chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE,
267 content::NotificationService::AllSources()); 267 content::NotificationService::AllSources());
268 } else { 268 } else {
269 BaseLoginDisplayHost::Observe(type, source, details); 269 LoginDisplayHostImpl::Observe(type, source, details);
270 } 270 }
271 } 271 }
272 272
273 void WebUILoginDisplayHost::LoadURL(const GURL& url) { 273 void WebUILoginDisplayHost::LoadURL(const GURL& url) {
274 InitLoginWindowAndView(); 274 InitLoginWindowAndView();
275 // Subscribe to crash events. 275 // Subscribe to crash events.
276 content::WebContentsObserver::Observe(login_view_->GetWebContents()); 276 content::WebContentsObserver::Observe(login_view_->GetWebContents());
277 login_view_->LoadURL(url); 277 login_view_->LoadURL(url);
278 } 278 }
279 279
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 root->SetProperty(ash::internal::kIgnoreSoloWindowFramePainterPolicy, 414 root->SetProperty(ash::internal::kIgnoreSoloWindowFramePainterPolicy,
415 old_ignore_solo_window_frame_painter_policy_value_); 415 old_ignore_solo_window_frame_painter_policy_value_);
416 } 416 }
417 } 417 }
418 login_window_->Close(); 418 login_window_->Close();
419 login_window_ = NULL; 419 login_window_ = NULL;
420 login_view_ = NULL; 420 login_view_ = NULL;
421 } 421 }
422 422
423 } // namespace chromeos 423 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_display_host.h ('k') | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698