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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h"
7 #include "base/values.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_ui.h"
12 #include "content/public/browser/web_ui_data_source.h"
13 #include "grit/browser_resources.h"
14 #include "grit/chromium_strings.h"
15 #include "grit/generated_resources.h"
17 ProfileSigninConfirmationUI::ProfileSigninConfirmationUI(content::WebUI* web_ui)
18 : ConstrainedWebDialogUI(web_ui) {
19 content::WebUIDataSource* html_source = content::WebUIDataSource::Create(
20 chrome::kChromeUIProfileSigninConfirmationHost);
21 html_source->SetUseJsonJSFormatV2();
23 html_source->AddLocalizedString(
24 "createProfileButtonText",
25 IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE);
26 html_source->AddLocalizedString(
28 IDS_ENTERPRISE_SIGNIN_CONTINUE);
29 html_source->AddLocalizedString("okButtonText", IDS_OK);
30 html_source->AddLocalizedString(
32 IDS_ENTERPRISE_SIGNIN_CANCEL);
33 html_source->AddLocalizedString(
35 IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_LEARN_MORE);
36 html_source->AddLocalizedString(
38 IDS_ENTERPRISE_SIGNIN_TITLE);
39 html_source->AddLocalizedString(
41 IDS_ENTERPRISE_SIGNIN_EXPLANATION);
42 html_source->AddLocalizedString(
44 IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE_MESSAGE);
46 html_source->SetJsonPath("strings.js");
48 html_source->AddResourcePath("profile_signin_confirmation.js",
49 IDR_PROFILE_SIGNIN_CONFIRMATION_JS);
50 html_source->AddResourcePath("profile_signin_confirmation.css",
51 IDR_PROFILE_SIGNIN_CONFIRMATION_CSS);
52 html_source->SetDefaultResource(IDR_PROFILE_SIGNIN_CONFIRMATION_HTML);
54 Profile* profile = Profile::FromWebUI(web_ui);
55 content::WebUIDataSource::Add(profile, html_source);
58 ProfileSigninConfirmationUI::~ProfileSigninConfirmationUI() {