| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/welcome_ui_android.h" | 5 #include "chrome/browser/ui/webui/welcome_ui_android.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 "http://www.google.com/intl/%s/chrome/browser/mobile/tour/android.html"; | 27 "http://www.google.com/intl/%s/chrome/browser/mobile/tour/android.html"; |
| 28 | 28 |
| 29 const char kPrivacyNoticeBaseURL[] = | 29 const char kPrivacyNoticeBaseURL[] = |
| 30 "http://www.google.com/chrome/intl/%s/privacy.html"; | 30 "http://www.google.com/chrome/intl/%s/privacy.html"; |
| 31 | 31 |
| 32 WelcomeUI::WelcomeUI(content::WebUI* web_ui) | 32 WelcomeUI::WelcomeUI(content::WebUI* web_ui) |
| 33 : content::WebUIController(web_ui) { | 33 : content::WebUIController(web_ui) { |
| 34 // Set up the chrome://welcome source. | 34 // Set up the chrome://welcome source. |
| 35 content::WebUIDataSource* html_source = | 35 content::WebUIDataSource* html_source = |
| 36 content::WebUIDataSource::Create(chrome::kChromeUIWelcomeHost); | 36 content::WebUIDataSource::Create(chrome::kChromeUIWelcomeHost); |
| 37 html_source->SetUseJsonJSFormatV2(); | |
| 38 | 37 |
| 39 // Localized strings. | 38 // Localized strings. |
| 40 html_source->AddLocalizedString("title", | 39 html_source->AddLocalizedString("title", |
| 41 IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE); | 40 IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE); |
| 42 html_source->AddLocalizedString("takeATour", IDS_FIRSTRUN_TAKE_TOUR); | 41 html_source->AddLocalizedString("takeATour", IDS_FIRSTRUN_TAKE_TOUR); |
| 43 html_source->AddLocalizedString("firstRunSignedInTitle", | 42 html_source->AddLocalizedString("firstRunSignedInTitle", |
| 44 IDS_FIRSTRUN_SIGNED_IN_TITLE); | 43 IDS_FIRSTRUN_SIGNED_IN_TITLE); |
| 45 html_source->AddLocalizedString("firstRunSignedInDescription", | 44 html_source->AddLocalizedString("firstRunSignedInDescription", |
| 46 IDS_FIRSTRUN_SIGNED_IN_DESCRIPTION); | 45 IDS_FIRSTRUN_SIGNED_IN_DESCRIPTION); |
| 47 html_source->AddLocalizedString("settings", IDS_FIRSTRUN_SETTINGS_LINK); | 46 html_source->AddLocalizedString("settings", IDS_FIRSTRUN_SETTINGS_LINK); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 74 | 73 |
| 75 Profile* profile = Profile::FromWebUI(web_ui); | 74 Profile* profile = Profile::FromWebUI(web_ui); |
| 76 content::WebUIDataSource::Add(profile, html_source); | 75 content::WebUIDataSource::Add(profile, html_source); |
| 77 | 76 |
| 78 // Add message handlers. | 77 // Add message handlers. |
| 79 web_ui->AddMessageHandler(new WelcomeHandler()); | 78 web_ui->AddMessageHandler(new WelcomeHandler()); |
| 80 } | 79 } |
| 81 | 80 |
| 82 WelcomeUI::~WelcomeUI() { | 81 WelcomeUI::~WelcomeUI() { |
| 83 } | 82 } |
| OLD | NEW |