| OLD | NEW |
| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_helper.h" | 10 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 11 #include "chrome/browser/chromeos/login/oobe_display.h" | 11 #include "chrome/browser/chromeos/login/oobe_display.h" |
| 12 #include "chrome/browser/chromeos/login/webui_login_display.h" | 12 #include "chrome/browser/chromeos/login/webui_login_display.h" |
| 13 #include "chrome/browser/chromeos/login/webui_login_view.h" | 13 #include "chrome/browser/chromeos/login/webui_login_view.h" |
| 14 #include "chrome/browser/chromeos/login/wizard_controller.h" | 14 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 15 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 15 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 16 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
| 17 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
| 18 | 18 |
| 19 #if defined(USE_AURA) | 19 #if defined(USE_AURA) |
| 20 #include "ash/shell.h" | 20 #include "ash/shell.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 void WebUILoginDisplayHost::StartSignInScreen() { | 127 void WebUILoginDisplayHost::StartSignInScreen() { |
| 128 is_showing_login_ = true; | 128 is_showing_login_ = true; |
| 129 | 129 |
| 130 if (!login_window_) | 130 if (!login_window_) |
| 131 LoadURL(GURL(kLoginURL)); | 131 LoadURL(GURL(kLoginURL)); |
| 132 | 132 |
| 133 BaseLoginDisplayHost::StartSignInScreen(); | 133 BaseLoginDisplayHost::StartSignInScreen(); |
| 134 CHECK(webui_login_display_); | 134 CHECK(webui_login_display_); |
| 135 GetOobeUI()->ShowSigninScreen(webui_login_display_); | 135 GetOobeUI()->ShowSigninScreen(webui_login_display_); |
| 136 if (chromeos::KioskModeHelper::IsKioskModeEnabled()) | 136 if (chromeos::KioskModeSettings::IsKioskModeEnabled()) |
| 137 SetStatusAreaVisible(false); | 137 SetStatusAreaVisible(false); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void WebUILoginDisplayHost::OnPreferencesChanged() { | 140 void WebUILoginDisplayHost::OnPreferencesChanged() { |
| 141 if (is_showing_login_) | 141 if (is_showing_login_) |
| 142 webui_login_display_->OnPreferencesChanged(); | 142 webui_login_display_->OnPreferencesChanged(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void WebUILoginDisplayHost::OnBrowserCreated() { | 145 void WebUILoginDisplayHost::OnBrowserCreated() { |
| 146 #if defined(USE_AURA) | 146 #if defined(USE_AURA) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 return static_cast<OobeUI*>(login_view_->GetWebUI()->GetController()); | 198 return static_cast<OobeUI*>(login_view_->GetWebUI()->GetController()); |
| 199 } | 199 } |
| 200 | 200 |
| 201 WizardController* WebUILoginDisplayHost::CreateWizardController() { | 201 WizardController* WebUILoginDisplayHost::CreateWizardController() { |
| 202 // TODO(altimofeev): ensure that WebUI is ready. | 202 // TODO(altimofeev): ensure that WebUI is ready. |
| 203 OobeDisplay* oobe_display = GetOobeUI(); | 203 OobeDisplay* oobe_display = GetOobeUI(); |
| 204 return new WizardController(this, oobe_display); | 204 return new WizardController(this, oobe_display); |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace chromeos | 207 } // namespace chromeos |
| OLD | NEW |