| 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" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h" | 24 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h" |
| 25 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.h" | 25 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.h" |
| 26 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" | 26 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" |
| 27 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 27 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 28 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" | 28 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" |
| 29 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" | 29 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" |
| 30 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" | 30 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" |
| 31 #include "chrome/browser/ui/webui/theme_source.h" | 31 #include "chrome/browser/ui/webui/theme_source.h" |
| 32 #include "chrome/common/jstemplate_builder.h" | 32 #include "chrome/common/jstemplate_builder.h" |
| 33 #include "chrome/common/url_constants.h" | 33 #include "chrome/common/url_constants.h" |
| 34 #include "content/browser/tab_contents/tab_contents.h" | 34 #include "content/public/browser/web_contents.h" |
| 35 #include "grit/browser_resources.h" | 35 #include "grit/browser_resources.h" |
| 36 #include "ui/base/resource/resource_bundle.h" | 36 #include "ui/base/resource/resource_bundle.h" |
| 37 | 37 |
| 38 using content::WebContents; |
| 39 |
| 38 namespace { | 40 namespace { |
| 39 | 41 |
| 40 // Path for a stripped down login page that does not have OOBE elements. | 42 // Path for a stripped down login page that does not have OOBE elements. |
| 41 const char kLoginPath[] = "login"; | 43 const char kLoginPath[] = "login"; |
| 42 | 44 |
| 43 // Path for the enterprise enrollment gaia page hosting. | 45 // Path for the enterprise enrollment gaia page hosting. |
| 44 const char kEnterpriseEnrollmentGaiaLoginPath[] = "gaialogin"; | 46 const char kEnterpriseEnrollmentGaiaLoginPath[] = "gaialogin"; |
| 45 | 47 |
| 46 } // namespace | 48 } // namespace |
| 47 | 49 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 101 |
| 100 std::string OobeUIHTMLSource::GetDataResource(int resource_id) const { | 102 std::string OobeUIHTMLSource::GetDataResource(int resource_id) const { |
| 101 const base::StringPiece html( | 103 const base::StringPiece html( |
| 102 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); | 104 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); |
| 103 return jstemplate_builder::GetI18nTemplateHtml(html, | 105 return jstemplate_builder::GetI18nTemplateHtml(html, |
| 104 localized_strings_.get()); | 106 localized_strings_.get()); |
| 105 } | 107 } |
| 106 | 108 |
| 107 // OobeUI ---------------------------------------------------------------------- | 109 // OobeUI ---------------------------------------------------------------------- |
| 108 | 110 |
| 109 OobeUI::OobeUI(TabContents* contents) | 111 OobeUI::OobeUI(WebContents* contents) |
| 110 : ChromeWebUI(contents), | 112 : ChromeWebUI(contents), |
| 111 update_screen_actor_(NULL), | 113 update_screen_actor_(NULL), |
| 112 network_screen_actor_(NULL), | 114 network_screen_actor_(NULL), |
| 113 eula_screen_actor_(NULL), | 115 eula_screen_actor_(NULL), |
| 114 signin_screen_handler_(NULL), | 116 signin_screen_handler_(NULL), |
| 115 user_image_screen_actor_(NULL) { | 117 user_image_screen_actor_(NULL) { |
| 116 core_handler_ = new CoreOobeHandler(this); | 118 core_handler_ = new CoreOobeHandler(this); |
| 117 AddScreenHandler(core_handler_); | 119 AddScreenHandler(core_handler_); |
| 118 | 120 |
| 119 AddScreenHandler(new NetworkDropdownHandler); | 121 AddScreenHandler(new NetworkDropdownHandler); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 241 |
| 240 void OobeUI::ResetSigninScreenHandlerDelegate() { | 242 void OobeUI::ResetSigninScreenHandlerDelegate() { |
| 241 signin_screen_handler_->SetDelegate(NULL); | 243 signin_screen_handler_->SetDelegate(NULL); |
| 242 } | 244 } |
| 243 | 245 |
| 244 void OobeUI::OnLoginPromptVisible() { | 246 void OobeUI::OnLoginPromptVisible() { |
| 245 user_image_screen_actor_->CheckCameraPresence(); | 247 user_image_screen_actor_->CheckCameraPresence(); |
| 246 } | 248 } |
| 247 | 249 |
| 248 } // namespace chromeos | 250 } // namespace chromeos |
| OLD | NEW |