OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/options/chromeos/options_stylus_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/options_stylus_handler.h" |
6 | 6 |
7 #include "ash/common/system/chromeos/palette/palette_utils.h" | 7 #include "ash/common/system/chromeos/palette/palette_utils.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 "BrowserOptions.setStylusInputStatus", | 101 "BrowserOptions.setStylusInputStatus", |
102 base::Value(ash::palette_utils::HasStylusInput())); | 102 base::Value(ash::palette_utils::HasStylusInput())); |
103 } | 103 } |
104 | 104 |
105 void OptionsStylusHandler::UpdateNoteTakingApps() { | 105 void OptionsStylusHandler::UpdateNoteTakingApps() { |
106 bool waiting_for_android = false; | 106 bool waiting_for_android = false; |
107 note_taking_app_ids_.clear(); | 107 note_taking_app_ids_.clear(); |
108 base::ListValue apps_list; | 108 base::ListValue apps_list; |
109 | 109 |
110 NoteTakingHelper* helper = NoteTakingHelper::Get(); | 110 NoteTakingHelper* helper = NoteTakingHelper::Get(); |
111 if (helper->android_enabled() && !helper->android_apps_received()) { | 111 if (helper->play_store_enabled() && !helper->android_apps_received()) { |
112 // If Android is enabled but not ready yet, let the JS know so it can | 112 // If Play Store is enabled but not ready yet, let the JS know so it can |
113 // disable the menu and display an explanatory message. | 113 // disable the menu and display an explanatory message. |
114 waiting_for_android = true; | 114 waiting_for_android = true; |
115 } else { | 115 } else { |
116 for (const NoteTakingAppInfo& info : | 116 for (const NoteTakingAppInfo& info : |
117 NoteTakingHelper::Get()->GetAvailableApps( | 117 NoteTakingHelper::Get()->GetAvailableApps( |
118 Profile::FromWebUI(web_ui()))) { | 118 Profile::FromWebUI(web_ui()))) { |
119 std::unique_ptr<base::DictionaryValue> dict( | 119 std::unique_ptr<base::DictionaryValue> dict( |
120 new base::DictionaryValue()); | 120 new base::DictionaryValue()); |
121 dict->SetString(kAppNameKey, info.name); | 121 dict->SetString(kAppNameKey, info.name); |
122 dict->SetString(kAppIdKey, info.app_id); | 122 dict->SetString(kAppIdKey, info.app_id); |
(...skipping 20 matching lines...) Expand all Loading... |
143 LOG(ERROR) << "Got unknown note-taking-app ID \"" << app_id << "\""; | 143 LOG(ERROR) << "Got unknown note-taking-app ID \"" << app_id << "\""; |
144 return; | 144 return; |
145 } | 145 } |
146 | 146 |
147 NoteTakingHelper::Get()->SetPreferredApp(Profile::FromWebUI(web_ui()), | 147 NoteTakingHelper::Get()->SetPreferredApp(Profile::FromWebUI(web_ui()), |
148 app_id); | 148 app_id); |
149 } | 149 } |
150 | 150 |
151 } // namespace options | 151 } // namespace options |
152 } // namespace chromeos | 152 } // namespace chromeos |
OLD | NEW |