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

Unified Diff: chrome/browser/ui/webui/settings/md_settings_ui.cc

Issue 1635673003: MD Settings: Add helper method for responding to cr.sendWithPromise. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings/md_settings_ui.cc
diff --git a/chrome/browser/ui/webui/settings/md_settings_ui.cc b/chrome/browser/ui/webui/settings/md_settings_ui.cc
index 3ace24271cc641730b1a45f6bbbeb84d7a7e7474..0db61f479b32615199be0bcec376acb875e92bdf 100644
--- a/chrome/browser/ui/webui/settings/md_settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc
@@ -40,6 +40,12 @@ SettingsPageUIHandler::SettingsPageUIHandler() {
SettingsPageUIHandler::~SettingsPageUIHandler() {
}
+void SettingsPageUIHandler::CallJavascriptCallback(
+ const base::Value& callback_id, const base::Value& response) {
+ // cr.webUIResponse is a global JS function exposed from cr.js.
+ web_ui()->CallJavascriptFunction("cr.webUIResponse", callback_id, response);
+}
+
MdSettingsUI::MdSettingsUI(content::WebUI* web_ui)
: content::WebUIController(web_ui) {
Profile* profile = Profile::FromWebUI(web_ui);
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_ui.h ('k') | chrome/test/data/webui/webui_resource_async_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698