diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 09:06:50 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 09:06:50 +0000 |
commit | 9027cb34739d0b02cc863ad572367742ab4c4510 (patch) | |
tree | 43e8e8dda035a5736f3b8210d65227d54cfbebd8 | |
parent | 70fd3bb96a93c887c0adc08bcf6ce4635c5e17a8 (diff) | |
download | chromium_src-9027cb34739d0b02cc863ad572367742ab4c4510.zip chromium_src-9027cb34739d0b02cc863ad572367742ab4c4510.tar.gz chromium_src-9027cb34739d0b02cc863ad572367742ab4c4510.tar.bz2 |
cros: Fix kiosk mode login regression.
BUG=178710
TEST=Verify kiosk mode login works as expected.
R=rkc@chromium.org
TBR=ben@chromium.org for browser_resources.grd change
Review URL: https://chromiumcodereview.appspot.com/12316161
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185184 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_resources.grd | 1 | ||||
-rw-r--r-- | chrome/browser/resources/chromeos/login/demo_user_login.html | 5 | ||||
-rw-r--r-- | chrome/browser/ui/webui/chromeos/login/oobe_ui.cc | 13 |
3 files changed, 15 insertions, 4 deletions
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index bfd7bf8f..5f4e428 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd @@ -26,6 +26,7 @@ </if> <if expr="pp_ifdef('chromeos')"> <structure name="IDR_DEMO_USER_LOGIN_HTML" file="resources\chromeos\login\demo_user_login.html" flattenhtml="true" type="chrome_html" /> + <structure name="IDR_DEMO_USER_LOGIN_JS" file="resources\chromeos\login\demo_user_login.js" flattenhtml="true" type="chrome_html" /> <structure name="IDR_APP_LAUNCH_SPLASH_HTML" file="resources\chromeos\app_launch\app_launch.html" flattenhtml="true" type="chrome_html" /> <structure name="IDR_APP_LAUNCH_SPLASH_JS" file="resources\chromeos\app_launch\app_launch.js" flattenhtml="true" type="chrome_html" /> </if> diff --git a/chrome/browser/resources/chromeos/login/demo_user_login.html b/chrome/browser/resources/chromeos/login/demo_user_login.html index ed3dc5d..5455b2d 100644 --- a/chrome/browser/resources/chromeos/login/demo_user_login.html +++ b/chrome/browser/resources/chromeos/login/demo_user_login.html @@ -4,8 +4,10 @@ <link rel="stylesheet" href="chrome://resources/css/spinner.css"> <link rel="stylesheet" href="chrome://resources/css/chrome_shared.css"> <link rel="stylesheet" href="demo_user_login.css"> +<script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/util.js"></script> -<script src="demo_user_login.js"></script> +<script src="chrome://oobe/strings.js"></script> +<script src="chrome://oobe/demo_user_login.js"></script> </head> <body i18n-values=".style.fontFamily:fontfamily;"> <div id="page"> @@ -19,5 +21,6 @@ </div> </div> </div> + <script src="chrome://resources/js/i18n_template2.js"></script> </body> </html> diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc index 93bc934..fa35ee8 100644 --- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc +++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc @@ -57,6 +57,7 @@ const char kEnterpriseEnrollmentGaiaLoginPath[] = "gaialogin"; const char kStringsJSPath[] = "strings.js"; const char kLoginJSPath[] = "login.js"; const char kOobeJSPath[] = "oobe.js"; +const char kDemoUserLoginJSPath[] = "demo_user_login.js"; // Filter handler of chrome://oobe data source. bool HandleRequestCallback( @@ -82,9 +83,15 @@ content::WebUIDataSource* CreateOobeUIDataSource( source->SetUseJsonJSFormatV2(); source->AddLocalizedStrings(localized_strings); source->SetJsonPath(kStringsJSPath); - source->SetDefaultResource( - chromeos::KioskModeSettings::Get()->IsKioskModeEnabled() ? - IDR_DEMO_USER_LOGIN_HTML : IDR_OOBE_HTML); + + if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { + source->SetDefaultResource(IDR_DEMO_USER_LOGIN_HTML); + source->AddResourcePath(kDemoUserLoginJSPath, + IDR_DEMO_USER_LOGIN_JS); + return source; + } + + source->SetDefaultResource(IDR_OOBE_HTML); source->AddResourcePath(kOobeJSPath, IDR_OOBE_JS); source->AddResourcePath(kLoginPath, |