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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc

Issue 2886083002: MD Settings: Use FireWebUIListener() helper wherever possible. (Closed)
Patch Set: Fixed typo Created 3 years, 7 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/chromeos/device_stylus_handler.cc
diff --git a/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc b/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
index cac710298f5a2031920242baa5a7e9db019cdf8b..14228adfb3cea5e19e8e89b5244119ba22b51c2c 100644
--- a/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
@@ -84,9 +84,8 @@ void StylusHandler::UpdateNoteTakingApps() {
}
AllowJavascript();
- CallJavascriptFunction("cr.webUIListenerCallback",
- base::Value("onNoteTakingAppsUpdated"), apps_list,
- base::Value(waiting_for_android));
+ FireWebUIListener("onNoteTakingAppsUpdated", apps_list,
+ base::Value(waiting_for_android));
}
void StylusHandler::RequestApps(const base::ListValue* unused_args) {
@@ -116,9 +115,8 @@ void StylusHandler::HandleInitialize(const base::ListValue* args) {
void StylusHandler::SendHasStylus() {
DCHECK(ui::InputDeviceManager::GetInstance()->AreDeviceListsComplete());
AllowJavascript();
- CallJavascriptFunction("cr.webUIListenerCallback",
- base::Value("has-stylus-changed"),
- base::Value(ash::palette_utils::HasStylusInput()));
+ FireWebUIListener("has-stylus-changed",
+ base::Value(ash::palette_utils::HasStylusInput()));
}
void StylusHandler::ShowPlayStoreApps(const base::ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698