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

Side by Side Diff: chrome/browser/ui/webui/md_feedback/md_feedback_ui.cc

Issue 2163753003: [Md Feedback] Add the rest of existing strings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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
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/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 namespace { 73 namespace {
74 74
75 content::WebUIDataSource* CreateMdFeedbackUIHTMLSource(Profile* profile) { 75 content::WebUIDataSource* CreateMdFeedbackUIHTMLSource(Profile* profile) {
76 content::WebUIDataSource* html_source = 76 content::WebUIDataSource* html_source =
77 content::WebUIDataSource::Create(chrome::kChromeUIFeedbackHost); 77 content::WebUIDataSource::Create(chrome::kChromeUIFeedbackHost);
78 78
79 // General strings. 79 // General strings.
80 html_source->AddLocalizedString("headingText", 80 html_source->AddLocalizedString("headingText",
81 IDS_MD_FEEDBACK_HEADING); 81 IDS_MD_FEEDBACK_HEADING);
82 html_source->AddLocalizedString("privacyNote",
83 IDS_MD_FEEDBACK_PRIVACY_NOTE);
82 84
83 // Input labels. 85 // Input labels.
84 html_source->AddLocalizedString("emailLabel", 86 html_source->AddLocalizedString("emailLabel",
85 IDS_MD_FEEDBACK_USER_EMAIL_LABEL); 87 IDS_MD_FEEDBACK_USER_EMAIL_LABEL);
86 html_source->AddLocalizedString("openEndedLabel", 88 html_source->AddLocalizedString("openEndedLabel",
87 IDS_MD_FEEDBACK_OPEN_ENDED_LABEL); 89 IDS_MD_FEEDBACK_OPEN_ENDED_LABEL);
88 html_source->AddLocalizedString("urlLabel", 90 html_source->AddLocalizedString("urlLabel",
89 IDS_MD_FEEDBACK_URL_LABEL); 91 IDS_MD_FEEDBACK_URL_LABEL);
90 92
91 // Buttons. 93 // Buttons.
92 html_source->AddLocalizedString("cancelButton", 94 html_source->AddLocalizedString("cancelButton",
93 IDS_MD_FEEDBACK_CANCEL_BUTTON); 95 IDS_MD_FEEDBACK_CANCEL_BUTTON);
94 html_source->AddLocalizedString("sendReportButton", 96 html_source->AddLocalizedString("sendReportButton",
95 IDS_MD_FEEDBACK_SEND_REPORT_BUTTON); 97 IDS_MD_FEEDBACK_SEND_REPORT_BUTTON);
96 98
99 // Checkbox labels.
100 html_source->AddLocalizedString("includeScreenshotLabel",
101 IDS_MD_FEEDBACK_SCREENSHOT_LABEL);
102 html_source->AddLocalizedString("sendSystemInfoLabel",
103 IDS_MD_FEEDBACK_SEND_SYSTEM_INFO_LABEL);
104
97 // Polymer resources. 105 // Polymer resources.
98 html_source->AddResourcePath("feedback_container.html", 106 html_source->AddResourcePath("feedback_container.html",
99 IDR_MD_FEEDBACK_FEEDBACK_CONTAINER_HTML); 107 IDR_MD_FEEDBACK_FEEDBACK_CONTAINER_HTML);
100 html_source->AddResourcePath("feedback_container.js", 108 html_source->AddResourcePath("feedback_container.js",
101 IDR_MD_FEEDBACK_FEEDBACK_CONTAINER_JS); 109 IDR_MD_FEEDBACK_FEEDBACK_CONTAINER_JS);
102 110
103 html_source->SetJsonPath("strings.js"); 111 html_source->SetJsonPath("strings.js");
104 html_source->SetDefaultResource(IDR_MD_FEEDBACK_FEEDBACK_HTML); 112 html_source->SetDefaultResource(IDR_MD_FEEDBACK_FEEDBACK_HTML);
105 return html_source; 113 return html_source;
106 } 114 }
(...skipping 13 matching lines...) Expand all
120 128
121 void ShowFeedbackWebDialog( 129 void ShowFeedbackWebDialog(
122 content::BrowserContext* browser_context) { 130 content::BrowserContext* browser_context) {
123 // TODO(apacible): Platform dependent implementations. 131 // TODO(apacible): Platform dependent implementations.
124 #if !defined(OS_MACOSX) 132 #if !defined(OS_MACOSX)
125 // TODO(apacible): If a feedback dialog is already open, bring that dialog 133 // TODO(apacible): If a feedback dialog is already open, bring that dialog
126 // to the front rather than creating a new dialog. 134 // to the front rather than creating a new dialog.
127 chrome::ShowWebDialog(NULL, browser_context, new MdFeedbackDialogDelegate()); 135 chrome::ShowWebDialog(NULL, browser_context, new MdFeedbackDialogDelegate());
128 #endif // !OS_MACOSX 136 #endif // !OS_MACOSX
129 } 137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698