Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5443)

Unified Diff: chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc

Issue 12221111: Add a modal confirmation dialog to the enterprise profile sign-in flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more cleanup Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc
diff --git a/chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc b/chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0600fef275931d3817cb5c91c64cc1a372b0c158
--- /dev/null
+++ b/chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc
@@ -0,0 +1,60 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h"
+
+#include "base/values.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/url_constants.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_ui.h"
+#include "content/public/browser/web_ui_data_source.h"
+#include "grit/browser_resources.h"
+#include "grit/chromium_strings.h"
+#include "grit/generated_resources.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/resource_bundle.h"
+
+ProfileSigninConfirmationUI::ProfileSigninConfirmationUI(content::WebUI* web_ui)
+ : ConstrainedWebDialogUI(web_ui) {
+ content::WebUIDataSource* html_source = content::WebUIDataSource::Create(
+ chrome::kChromeUIProfileSigninConfirmationHost);
+ html_source->SetUseJsonJSFormatV2();
+
+ html_source->AddLocalizedString(
+ "createProfileButtonText",
+ IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE_YES);
+ html_source->AddLocalizedString(
+ "continueButtonText",
+ IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE_NO);
+ html_source->AddLocalizedString(
+ "cancelButtonText",
+ IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE_CANCEL);
+ html_source->AddLocalizedString(
+ "learnMoreText",
+ IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_LEARN_MORE);
+ html_source->AddLocalizedString(
+ "dialogTitle",
+ IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_DIALOG_TITLE);
+ html_source->AddLocalizedString(
+ "dialogMessage",
+ IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_MESSAGE);
+ html_source->AddLocalizedString(
+ "dialogPrompt",
+ IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE_PROMPT);
+
+ html_source->SetJsonPath("strings.js");
+
+ html_source->AddResourcePath("profile_signin_confirmation.css",
+ IDR_PROFILE_SIGNIN_CONFIRMATION_CSS);
+ html_source->AddResourcePath("profile_signin_confirmation.js",
+ IDR_PROFILE_SIGNIN_CONFIRMATION_JS);
+ html_source->SetDefaultResource(IDR_PROFILE_SIGNIN_CONFIRMATION_HTML);
+
+ Profile* profile = Profile::FromWebUI(web_ui);
+ content::WebUIDataSource::Add(profile, html_source);
+}
+
+ProfileSigninConfirmationUI::~ProfileSigninConfirmationUI() {
+}

Powered by Google App Engine
This is Rietveld 408576698