Index: chrome/browser/chromeos/login/wizard_controller.cc |
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc |
index 08ef6d07391f54aca144a9fb219372bfa86d0a96..5f1672c96fe04ae9cff4491aa213dbe8f8a83cd7 100644 |
--- a/chrome/browser/chromeos/login/wizard_controller.cc |
+++ b/chrome/browser/chromeos/login/wizard_controller.cc |
@@ -28,6 +28,7 @@ |
#include "chrome/browser/chromeos/login/eula_view.h" |
#include "chrome/browser/chromeos/login/existing_user_controller.h" |
#include "chrome/browser/chromeos/login/helper.h" |
+#include "chrome/browser/chromeos/login/html_page_screen.h" |
#include "chrome/browser/chromeos/login/language_switch_menu.h" |
#include "chrome/browser/chromeos/login/login_screen.h" |
#include "chrome/browser/chromeos/login/login_utils.h" |
@@ -210,6 +211,7 @@ const char WizardController::kUpdateScreenName[] = "update"; |
const char WizardController::kUserImageScreenName[] = "image"; |
const char WizardController::kEulaScreenName[] = "eula"; |
const char WizardController::kRegistrationScreenName[] = "register"; |
+const char WizardController::kHTMLPageScreenName[] = "html"; |
// Passing this parameter as a "first screen" initiates full OOBE flow. |
const char WizardController::kOutOfBoxScreenName[] = "oobe"; |
@@ -365,6 +367,23 @@ chromeos::RegistrationScreen* WizardController::GetRegistrationScreen() { |
return registration_screen_.get(); |
} |
+chromeos::HTMLPageScreen* WizardController::GetHTMLPageScreen() { |
+ if (!html_page_screen_.get()) { |
+ CommandLine* command_line = CommandLine::ForCurrentProcess(); |
+ std::string url; |
+ // It's strange but args may contains empty strings. |
+ for (size_t i = 0; i < command_line->args().size(); i++) { |
+ if (!command_line->args()[i].empty()) { |
+ DCHECK(url.empty()) << "More than one URL in command line"; |
+ url = command_line->args()[i]; |
+ } |
+ } |
+ DCHECK(!url.empty()) << "No URL in commane line"; |
+ html_page_screen_.reset(new chromeos::HTMLPageScreen(this, url)); |
+ } |
+ return html_page_screen_.get(); |
+} |
+ |
void WizardController::ShowNetworkScreen() { |
SetStatusAreaVisible(false); |
SetCurrentScreen(GetNetworkScreen()); |
@@ -443,6 +462,13 @@ void WizardController::ShowRegistrationScreen() { |
#endif |
} |
+void WizardController::ShowHTMLPageScreen() { |
+ LOG(INFO) << "Showing HTML page screen."; |
+ SetStatusAreaVisible(true); |
+ background_view_->SetOobeProgressBarVisible(false); |
+ SetCurrentScreen(GetHTMLPageScreen()); |
+} |
+ |
void WizardController::SetStatusAreaVisible(bool visible) { |
// When ExistingUserController passes background ownership |
// to WizardController it happens after screen is shown. |
@@ -640,6 +666,8 @@ void WizardController::ShowFirstScreen(const std::string& first_screen_name) { |
// Just proceed to image screen. |
OnRegistrationSuccess(); |
} |
+ } else if (first_screen_name == kHTMLPageScreenName) { |
+ ShowHTMLPageScreen(); |
} else if (first_screen_name != kTestNoScreenName) { |
if (is_out_of_box_) { |
ShowNetworkScreen(); |