| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/signin/profile_signin_confirmation_ui.h" | 5 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "chrome/grit/chromium_strings.h" | 10 #include "chrome/grit/chromium_strings.h" |
| 11 #include "chrome/grit/generated_resources.h" | 11 #include "chrome/grit/generated_resources.h" |
| 12 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
| 13 #include "content/public/browser/web_ui.h" | 13 #include "content/public/browser/web_ui.h" |
| 14 #include "content/public/browser/web_ui_data_source.h" | 14 #include "content/public/browser/web_ui_data_source.h" |
| 15 #include "grit/browser_resources.h" | 15 #include "grit/browser_resources.h" |
| 16 | 16 |
| 17 ProfileSigninConfirmationUI::ProfileSigninConfirmationUI(content::WebUI* web_ui) | 17 ProfileSigninConfirmationUI::ProfileSigninConfirmationUI(content::WebUI* web_ui) |
| 18 : ConstrainedWebDialogUI(web_ui) { | 18 : ConstrainedWebDialogUI(web_ui) { |
| 19 content::WebUIDataSource* html_source = content::WebUIDataSource::Create( | 19 content::WebUIDataSource* html_source = content::WebUIDataSource::Create( |
| 20 chrome::kChromeUIProfileSigninConfirmationHost); | 20 chrome::kChromeUIProfileSigninConfirmationHost); |
| 21 html_source->SetUseJsonJSFormatV2(); | |
| 22 | 21 |
| 23 html_source->AddLocalizedString( | 22 html_source->AddLocalizedString( |
| 24 "createProfileButtonText", | 23 "createProfileButtonText", |
| 25 IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE); | 24 IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE); |
| 26 html_source->AddLocalizedString( | 25 html_source->AddLocalizedString( |
| 27 "continueButtonText", | 26 "continueButtonText", |
| 28 IDS_ENTERPRISE_SIGNIN_CONTINUE); | 27 IDS_ENTERPRISE_SIGNIN_CONTINUE); |
| 29 html_source->AddLocalizedString("okButtonText", IDS_OK); | 28 html_source->AddLocalizedString("okButtonText", IDS_OK); |
| 30 html_source->AddLocalizedString( | 29 html_source->AddLocalizedString( |
| 31 "cancelButtonText", | 30 "cancelButtonText", |
| (...skipping 18 matching lines...) Expand all Loading... |
| 50 html_source->AddResourcePath("profile_signin_confirmation.css", | 49 html_source->AddResourcePath("profile_signin_confirmation.css", |
| 51 IDR_PROFILE_SIGNIN_CONFIRMATION_CSS); | 50 IDR_PROFILE_SIGNIN_CONFIRMATION_CSS); |
| 52 html_source->SetDefaultResource(IDR_PROFILE_SIGNIN_CONFIRMATION_HTML); | 51 html_source->SetDefaultResource(IDR_PROFILE_SIGNIN_CONFIRMATION_HTML); |
| 53 | 52 |
| 54 Profile* profile = Profile::FromWebUI(web_ui); | 53 Profile* profile = Profile::FromWebUI(web_ui); |
| 55 content::WebUIDataSource::Add(profile, html_source); | 54 content::WebUIDataSource::Add(profile, html_source); |
| 56 } | 55 } |
| 57 | 56 |
| 58 ProfileSigninConfirmationUI::~ProfileSigninConfirmationUI() { | 57 ProfileSigninConfirmationUI::~ProfileSigninConfirmationUI() { |
| 59 } | 58 } |
| OLD | NEW |