Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 "content/public/browser/web_ui_data_source.h" | |
| 12 #include "grit/browser_resources.h" | |
| 13 | |
| 14 SyncConfirmationUI::SyncConfirmationUI(content::WebUI* web_ui) | |
| 15 : WebDialogUI(web_ui) { | |
| 16 Profile* profile = Profile::FromWebUI(web_ui); | |
| 17 content::WebUIDataSource* source = | |
| 18 content::WebUIDataSource::Create("sync-confirmation"); | |
|
Dan Beam
2016/01/21 03:57:33
please use kChromeUISyncConfirmationHost like ever
anthonyvd
2016/01/21 22:36:11
Done.
| |
| 19 source->SetJsonPath("strings.js"); | |
| 20 source->SetDefaultResource(IDR_SYNC_CONFIRMATION_HTML); | |
| 21 source->AddResourcePath("sync-confirmation.css", IDR_SYNC_CONFIRMATION_CSS); | |
| 22 source->AddResourcePath("sync-confirmation.js", IDR_SYNC_CONFIRMATION_JS); | |
|
Dan Beam
2016/01/21 03:57:33
replace - with _ in the file names
anthonyvd
2016/01/21 22:36:11
Done.
| |
| 23 | |
| 24 source->AddLocalizedString("syncConfirmationTitle", | |
| 25 IDS_SYNC_CONFIRMATION_TITLE); | |
| 26 source->AddLocalizedString("syncConfirmationBody", | |
| 27 IDS_SYNC_CONFIRMATION_BODY); | |
| 28 source->AddLocalizedString("syncConfirmationConfirmLabel", | |
| 29 IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL); | |
| 30 source->AddLocalizedString("syncConfirmationUndoLabel", | |
| 31 IDS_SYNC_CONFIRMATION_UNDO_BUTTON_LABEL); | |
| 32 | |
| 33 content::WebUIDataSource::Add(profile, source); | |
| 34 web_ui->AddMessageHandler(new SyncConfirmationHandler); | |
| 35 } | |
| OLD | NEW |