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

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

Issue 1778663007: MD Settings: break SettingsPageUIHandler to its own file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startup-nits
Patch Set: fix compile Created 4 years, 9 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/settings_page_ui_handler.cc
diff --git a/chrome/browser/ui/webui/settings/settings_page_ui_handler.cc b/chrome/browser/ui/webui/settings/settings_page_ui_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..93326fa23f5a79a271fecb5cc02159c72d733298
--- /dev/null
+++ b/chrome/browser/ui/webui/settings/settings_page_ui_handler.cc
@@ -0,0 +1,33 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
+
+#include "content/public/browser/web_ui.h"
+
+namespace settings {
+
+SettingsPageUIHandler::SettingsPageUIHandler() {}
+
+SettingsPageUIHandler::~SettingsPageUIHandler() {}
+
+void SettingsPageUIHandler::ResolveJavascriptCallback(
+ 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,
+ base::FundamentalValue(true), response);
+}
+
+void SettingsPageUIHandler::RejectJavascriptCallback(
+ 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,
+ base::FundamentalValue(false), response);
+}
+
+} // namespace settings

Powered by Google App Engine
This is Rietveld 408576698