Index: chrome/browser/ui/webui/signin/sync_confirmation_ui.cc |
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..486f61a3fb5b9306e9c90c7b48172fb8a7ab67e6 |
--- /dev/null |
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc |
@@ -0,0 +1,36 @@ |
+// Copyright 2015 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/sync_confirmation_ui.h" |
+ |
+#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h" |
+#include "chrome/grit/generated_resources.h" |
+#include "content/public/browser/web_ui.h" |
+#include "grit/browser_resources.h" |
+ |
+SyncConfirmationUI::SyncConfirmationUI(content::WebUI* web_ui) |
+ : WebDialogUI(web_ui) { |
+ Profile* profile = Profile::FromWebUI(web_ui); |
+ content::WebUIDataSource* source = |
+ content::WebUIDataSource::Create("sync-confirmation"); |
+ source->SetJsonPath("strings.js"); |
+ source->OverrideContentSecurityPolicyFrameSrc("frame-src chrome-extension:;"); |
+ source->OverrideContentSecurityPolicyObjectSrc("object-src *;"); |
+ source->SetDefaultResource(IDR_SYNC_CONFIRMATION_HTML); |
+ source->AddResourcePath("sync-confirmation.css", IDR_SYNC_CONFIRMATION_CSS); |
+ source->AddResourcePath("sync-confirmation.js", IDR_SYNC_CONFIRMATION_JS); |
+ |
+ source->AddLocalizedString("syncConfirmationTitle", |
+ IDS_SYNC_CONFIRMATION_TITLE); |
+ source->AddLocalizedString("syncConfirmationBody", |
+ IDS_SYNC_CONFIRMATION_BODY); |
+ source->AddLocalizedString("syncConfirmationConfirmLabel", |
+ IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL); |
+ source->AddLocalizedString("syncConfirmationUndoLabel", |
+ IDS_SYNC_CONFIRMATION_UNDO_BUTTON_LABEL); |
+ |
+ content::WebUIDataSource::Add(profile, source); |
+ web_ui->AddMessageHandler(new SyncConfirmationHandler); |
+} |