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/login/oobe_display.h" | 11 #include "chrome/browser/chromeos/login/oobe_display.h" |
11 #include "chrome/browser/chromeos/login/webui_login_display.h" | 12 #include "chrome/browser/chromeos/login/webui_login_display.h" |
12 #include "chrome/browser/chromeos/login/webui_login_view.h" | 13 #include "chrome/browser/chromeos/login/webui_login_view.h" |
13 #include "chrome/browser/chromeos/login/wizard_controller.h" | 14 #include "chrome/browser/chromeos/login/wizard_controller.h" |
14 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 15 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
15 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
16 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
17 | 18 |
18 #if defined(USE_AURA) | 19 #if defined(USE_AURA) |
19 #include "ash/shell.h" | 20 #include "ash/shell.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 scoped_parameters.release()); | 121 scoped_parameters.release()); |
121 } | 122 } |
122 | 123 |
123 void WebUILoginDisplayHost::StartSignInScreen() { | 124 void WebUILoginDisplayHost::StartSignInScreen() { |
124 if (!login_window_) | 125 if (!login_window_) |
125 LoadURL(GURL(kLoginURL)); | 126 LoadURL(GURL(kLoginURL)); |
126 | 127 |
127 BaseLoginDisplayHost::StartSignInScreen(); | 128 BaseLoginDisplayHost::StartSignInScreen(); |
128 CHECK(webui_login_display_); | 129 CHECK(webui_login_display_); |
129 GetOobeUI()->ShowSigninScreen(webui_login_display_); | 130 GetOobeUI()->ShowSigninScreen(webui_login_display_); |
| 131 if (chromeos::KioskModeHelper::IsKioskModeEnabled()) |
| 132 SetStatusAreaVisible(false); |
130 } | 133 } |
131 | 134 |
132 void WebUILoginDisplayHost::OnBrowserCreated() { | 135 void WebUILoginDisplayHost::OnBrowserCreated() { |
133 #if defined(USE_AURA) | 136 #if defined(USE_AURA) |
134 // Close lock window now so that the launched browser can receive focus. | 137 // Close lock window now so that the launched browser can receive focus. |
135 if (login_window_) { | 138 if (login_window_) { |
136 login_window_->Close(); | 139 login_window_->Close(); |
137 login_window_ = NULL; | 140 login_window_ = NULL; |
138 login_view_ = NULL; | 141 login_view_ = NULL; |
139 } | 142 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 return static_cast<OobeUI*>(login_view_->GetWebUI()->GetController()); | 186 return static_cast<OobeUI*>(login_view_->GetWebUI()->GetController()); |
184 } | 187 } |
185 | 188 |
186 WizardController* WebUILoginDisplayHost::CreateWizardController() { | 189 WizardController* WebUILoginDisplayHost::CreateWizardController() { |
187 // TODO(altimofeev): ensure that WebUI is ready. | 190 // TODO(altimofeev): ensure that WebUI is ready. |
188 OobeDisplay* oobe_display = GetOobeUI(); | 191 OobeDisplay* oobe_display = GetOobeUI(); |
189 return new WizardController(this, oobe_display); | 192 return new WizardController(this, oobe_display); |
190 } | 193 } |
191 | 194 |
192 } // namespace chromeos | 195 } // namespace chromeos |
OLD | NEW |