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

Side by Side Diff: chrome/browser/ui/webui/signin/sync_confirmation_ui.cc

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some tests. Created 5 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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.
4
5 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h"
9 #include "chrome/grit/generated_resources.h"
10 #include "content/public/browser/web_ui.h"
11 #include "grit/browser_resources.h"
12
13 SyncConfirmationUI::SyncConfirmationUI(content::WebUI* web_ui)
14 : WebDialogUI(web_ui) {
15 Profile* profile = Profile::FromWebUI(web_ui);
16 content::WebUIDataSource* source =
17 content::WebUIDataSource::Create("sync-confirmation");
18 source->SetJsonPath("strings.js");
19 source->OverrideContentSecurityPolicyFrameSrc("frame-src chrome-extension:;");
20 source->OverrideContentSecurityPolicyObjectSrc("object-src *;");
21 source->SetDefaultResource(IDR_SYNC_CONFIRMATION_HTML);
22 source->AddResourcePath("sync-confirmation.css", IDR_SYNC_CONFIRMATION_CSS);
23 source->AddResourcePath("sync-confirmation.js", IDR_SYNC_CONFIRMATION_JS);
24
25 source->AddLocalizedString("syncConfirmationTitle",
26 IDS_SYNC_CONFIRMATION_TITLE);
27 source->AddLocalizedString("syncConfirmationBody",
28 IDS_SYNC_CONFIRMATION_BODY);
29 source->AddLocalizedString("syncConfirmationConfirmLabel",
30 IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL);
31 source->AddLocalizedString("syncConfirmationUndoLabel",
32 IDS_SYNC_CONFIRMATION_UNDO_BUTTON_LABEL);
33
34 content::WebUIDataSource::Add(profile, source);
35 web_ui->AddMessageHandler(new SyncConfirmationHandler);
36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698