Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/webui/chromeos/login/oobe_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/ref_counted_memory.h" | 11 #include "base/memory/ref_counted_memory.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/browser_about_handler.h" | 13 #include "chrome/browser/browser_about_handler.h" |
| 14 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_helper.h" | |
| 14 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen_ actor.h" | 15 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen_ actor.h" |
| 15 #include "chrome/browser/chromeos/login/screen_locker.h" | 16 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 16 #include "chrome/browser/chromeos/login/user_manager.h" | 17 #include "chrome/browser/chromeos/login/user_manager.h" |
| 17 #include "chrome/browser/chromeos/login/wizard_controller.h" | 18 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/ui/webui/about_ui.h" | 20 #include "chrome/browser/ui/webui/about_ui.h" |
| 20 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 21 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 21 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 22 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
| 22 #include "chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h" | 23 #include "chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h" |
| 23 #include "chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr een_handler.h" | 24 #include "chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr een_handler.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 bool is_incognito, | 84 bool is_incognito, |
| 84 int request_id) { | 85 int request_id) { |
| 85 if (UserManager::Get()->user_is_logged_in() && | 86 if (UserManager::Get()->user_is_logged_in() && |
| 86 !ScreenLocker::default_screen_locker()) { | 87 !ScreenLocker::default_screen_locker()) { |
| 87 scoped_refptr<RefCountedBytes> empty_bytes(new RefCountedBytes()); | 88 scoped_refptr<RefCountedBytes> empty_bytes(new RefCountedBytes()); |
| 88 SendResponse(request_id, empty_bytes); | 89 SendResponse(request_id, empty_bytes); |
| 89 return; | 90 return; |
| 90 } | 91 } |
| 91 | 92 |
| 92 std::string response; | 93 std::string response; |
| 93 if (path.empty()) | 94 if (chromeos::KioskModeHelper::Get()->IsKioskModeEnabled()) |
|
Nikita (slow)
2012/02/29 12:21:55
This will also be shown in case we decide to show
rkc
2012/02/29 20:57:48
Correct. There is another CL I am working on that
| |
| 95 response = GetDataResource(IDR_DEMO_USER_LOGIN_HTML); | |
| 96 else if (path.empty()) | |
| 94 response = GetDataResource(IDR_OOBE_HTML); | 97 response = GetDataResource(IDR_OOBE_HTML); |
| 95 else if (path == kLoginPath) | 98 else if (path == kLoginPath) |
| 96 response = GetDataResource(IDR_LOGIN_HTML); | 99 response = GetDataResource(IDR_LOGIN_HTML); |
| 97 else if (path == kEnterpriseEnrollmentGaiaLoginPath) | 100 else if (path == kEnterpriseEnrollmentGaiaLoginPath) |
| 98 response = GetDataResource(IDR_GAIA_LOGIN_HTML); | 101 response = GetDataResource(IDR_GAIA_LOGIN_HTML); |
| 99 | 102 |
| 100 SendResponse(request_id, base::RefCountedString::TakeString(&response)); | 103 SendResponse(request_id, base::RefCountedString::TakeString(&response)); |
| 101 } | 104 } |
| 102 | 105 |
| 103 std::string OobeUIHTMLSource::GetDataResource(int resource_id) const { | 106 std::string OobeUIHTMLSource::GetDataResource(int resource_id) const { |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 242 | 245 |
| 243 void OobeUI::ResetSigninScreenHandlerDelegate() { | 246 void OobeUI::ResetSigninScreenHandlerDelegate() { |
| 244 signin_screen_handler_->SetDelegate(NULL); | 247 signin_screen_handler_->SetDelegate(NULL); |
| 245 } | 248 } |
| 246 | 249 |
| 247 void OobeUI::OnLoginPromptVisible() { | 250 void OobeUI::OnLoginPromptVisible() { |
| 248 user_image_screen_actor_->CheckCameraPresence(); | 251 user_image_screen_actor_->CheckCameraPresence(); |
| 249 } | 252 } |
| 250 | 253 |
| 251 } // namespace chromeos | 254 } // namespace chromeos |
| OLD | NEW |