| 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/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 "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 else if (path == kEnterpriseEnrollmentGaiaLoginPath) | 113 else if (path == kEnterpriseEnrollmentGaiaLoginPath) |
| 114 response = GetDataResource(IDR_GAIA_LOGIN_HTML); | 114 response = GetDataResource(IDR_GAIA_LOGIN_HTML); |
| 115 | 115 |
| 116 callback.Run(base::RefCountedString::TakeString(&response)); | 116 callback.Run(base::RefCountedString::TakeString(&response)); |
| 117 } | 117 } |
| 118 | 118 |
| 119 std::string OobeUIHTMLSource::GetDataResource(int resource_id) const { | 119 std::string OobeUIHTMLSource::GetDataResource(int resource_id) const { |
| 120 const base::StringPiece html( | 120 const base::StringPiece html( |
| 121 ResourceBundle::GetSharedInstance().GetRawDataResource( | 121 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 122 resource_id)); | 122 resource_id)); |
| 123 return jstemplate_builder::GetI18nTemplateHtml(html, | 123 return webui::GetI18nTemplateHtml(html, localized_strings_.get()); |
| 124 localized_strings_.get()); | |
| 125 } | 124 } |
| 126 | 125 |
| 127 // OobeUI ---------------------------------------------------------------------- | 126 // OobeUI ---------------------------------------------------------------------- |
| 128 | 127 |
| 129 // static | 128 // static |
| 130 const char OobeUI::kScreenOobeNetwork[] = "connect"; | 129 const char OobeUI::kScreenOobeNetwork[] = "connect"; |
| 131 const char OobeUI::kScreenOobeEula[] = "eula"; | 130 const char OobeUI::kScreenOobeEula[] = "eula"; |
| 132 const char OobeUI::kScreenOobeUpdate[] = "update"; | 131 const char OobeUI::kScreenOobeUpdate[] = "update"; |
| 133 const char OobeUI::kScreenOobeEnrollment[] = "oauth-enrollment"; | 132 const char OobeUI::kScreenOobeEnrollment[] = "oauth-enrollment"; |
| 134 const char OobeUI::kScreenGaiaSignin[] = "gaia-signin"; | 133 const char OobeUI::kScreenGaiaSignin[] = "gaia-signin"; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 void OobeUI::OnCurrentScreenChanged(const std::string& screen) { | 365 void OobeUI::OnCurrentScreenChanged(const std::string& screen) { |
| 367 if (screen_ids_.count(screen)) { | 366 if (screen_ids_.count(screen)) { |
| 368 current_screen_ = screen_ids_[screen]; | 367 current_screen_ = screen_ids_[screen]; |
| 369 } else { | 368 } else { |
| 370 NOTREACHED() << "Screen should be registered in InitializeScreenMaps()"; | 369 NOTREACHED() << "Screen should be registered in InitializeScreenMaps()"; |
| 371 current_screen_ = SCREEN_UNKNOWN; | 370 current_screen_ = SCREEN_UNKNOWN; |
| 372 } | 371 } |
| 373 } | 372 } |
| 374 | 373 |
| 375 } // namespace chromeos | 374 } // namespace chromeos |
| OLD | NEW |