| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/md_feedback/md_feedback_ui.h" | 5 #include "chrome/browser/ui/webui/md_feedback/md_feedback_ui.h" |
| 6 | 6 |
| 7 // #include "chrome/browser/profiles/profile.h" | 7 // #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/webui/md_feedback/md_feedback_webui_message_handler.
h" | 8 #include "chrome/browser/ui/webui/md_feedback/md_feedback_webui_message_handler.
h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "chrome/grit/browser_resources.h" | 10 #include "chrome/grit/browser_resources.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 content::WebUIDataSource* html_source = | 21 content::WebUIDataSource* html_source = |
| 22 content::WebUIDataSource::Create(chrome::kChromeUIFeedbackHost); | 22 content::WebUIDataSource::Create(chrome::kChromeUIFeedbackHost); |
| 23 | 23 |
| 24 // General strings. | 24 // General strings. |
| 25 html_source->AddLocalizedString("headingText", | 25 html_source->AddLocalizedString("headingText", |
| 26 IDS_MD_FEEDBACK_HEADING); | 26 IDS_MD_FEEDBACK_HEADING); |
| 27 #if defined(GOOGLE_CHROME_BUILD) | 27 #if defined(GOOGLE_CHROME_BUILD) |
| 28 html_source->AddLocalizedString("privacyNote", | 28 html_source->AddLocalizedString("privacyNote", |
| 29 IDS_MD_FEEDBACK_PRIVACY_NOTE); | 29 IDS_MD_FEEDBACK_PRIVACY_NOTE); |
| 30 #endif | 30 #endif |
| 31 | 31 html_source->AddLocalizedString("additionalInfoLabel", |
| 32 IDS_MD_FEEDBACK_ADDITIONAL_INFO_LABEL); |
| 32 // Input labels. | 33 // Input labels. |
| 33 html_source->AddLocalizedString("emailLabel", | 34 html_source->AddLocalizedString("emailLabel", |
| 34 IDS_MD_FEEDBACK_USER_EMAIL_LABEL); | 35 IDS_MD_FEEDBACK_USER_EMAIL_LABEL); |
| 35 html_source->AddLocalizedString("openEndedLabel", | 36 html_source->AddLocalizedString("openEndedLabel", |
| 36 IDS_MD_FEEDBACK_OPEN_ENDED_LABEL); | 37 IDS_MD_FEEDBACK_OPEN_ENDED_LABEL); |
| 37 html_source->AddLocalizedString("urlLabel", | 38 html_source->AddLocalizedString("urlLabel", |
| 38 IDS_MD_FEEDBACK_URL_LABEL); | 39 IDS_MD_FEEDBACK_URL_LABEL); |
| 39 | 40 |
| 40 // Buttons. | 41 // Buttons. |
| 41 html_source->AddLocalizedString("cancelButton", | 42 html_source->AddLocalizedString("cancelButton", |
| (...skipping 27 matching lines...) Expand all Loading... |
| 69 : content::WebUIController(web_ui), profile_(Profile::FromWebUI(web_ui)) { | 70 : content::WebUIController(web_ui), profile_(Profile::FromWebUI(web_ui)) { |
| 70 // Set up the chrome://feedback data html_source. | 71 // Set up the chrome://feedback data html_source. |
| 71 content::WebUIDataSource* html_source = | 72 content::WebUIDataSource* html_source = |
| 72 CreateMdFeedbackUIHTMLSource(profile_); | 73 CreateMdFeedbackUIHTMLSource(profile_); |
| 73 content::WebUIDataSource::Add(profile_, html_source); | 74 content::WebUIDataSource::Add(profile_, html_source); |
| 74 | 75 |
| 75 web_ui->AddMessageHandler(new MdFeedbackWebUIMessageHandler(this)); | 76 web_ui->AddMessageHandler(new MdFeedbackWebUIMessageHandler(this)); |
| 76 } | 77 } |
| 77 | 78 |
| 78 MdFeedbackUI::~MdFeedbackUI() {} | 79 MdFeedbackUI::~MdFeedbackUI() {} |
| OLD | NEW |