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

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

Issue 2682413002: cros: Fix crash when enabling arc in md-settings. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bbd8910d81fb2423a3b2928169839b741882bc87..0a7d66213e402929985b2b223a2ac10deeecf2e0 100644
--- a/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
@@ -66,7 +66,7 @@ void StylusHandler::UpdateNoteTakingApps() {
waiting_for_android = true;
} else {
std::vector<NoteTakingAppInfo> available_apps =
- NoteTakingHelper::Get()->GetAvailableApps(Profile::FromWebUI(web_ui()));
+ helper->GetAvailableApps(Profile::FromWebUI(web_ui()));
for (const NoteTakingAppInfo& info : available_apps) {
auto dict = base::MakeUnique<base::DictionaryValue>();
dict->SetString(kAppNameKey, info.name);
@@ -78,13 +78,13 @@ void StylusHandler::UpdateNoteTakingApps() {
}
}
+ AllowJavascript();
CallJavascriptFunction(
"cr.webUIListenerCallback", base::StringValue("onNoteTakingAppsUpdated"),
apps_list, base::FundamentalValue(waiting_for_android));
}
void StylusHandler::RequestApps(const base::ListValue* unused_args) {
- AllowJavascript();
UpdateNoteTakingApps();
}
@@ -104,13 +104,13 @@ void StylusHandler::SetPreferredNoteTakingApp(const base::ListValue* args) {
}
void StylusHandler::HandleInitialize(const base::ListValue* args) {
- AllowJavascript();
if (ui::InputDeviceManager::GetInstance()->AreDeviceListsComplete())
SendHasStylus();
}
void StylusHandler::SendHasStylus() {
DCHECK(ui::InputDeviceManager::GetInstance()->AreDeviceListsComplete());
+ AllowJavascript();
CallJavascriptFunction(
"cr.webUIListenerCallback", base::StringValue("has-stylus-changed"),
base::FundamentalValue(ash::palette_utils::HasStylusInput()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698